public static Observable<NetworkServiceDiscoveryInfo> startDiscovery(@NonNull Context context,@NonNull String protocol) throws NsdException {
  if (protocol.equalsIgnoreCase(ALL_AVAILABLE_SERVICES)) {
    throw new NsdException(NsdException.INVALID_ARGUMENT,protocol,0);
  }
  return DiscoveryOnSubscribeFactory.from(context,protocol);
}

public static Observable < NetworkServiceDiscoveryInfo > startDiscovery ( @ NonNull Context context , @ NonNull String protocol ) throws NsdException { if ( protocol . equalsIgnoreCase ( ALL_AVAILABLE_SERVICES ) ) { throw new NsdException ( NsdException . INVALID_ARGUMENT , protocol , 0 ) ; } return DiscoveryOnSubscribeFactory . from ( context , protocol ) ; }
this method is the one that shall be used in order to discover all the services available in the current network for a given protocol . by default , this call will be executed on a proper scheduler and return the results onto the main thread . < br / >
