Code example for NsdServiceInfo

Methods: setPort, setServiceName, setServiceType

0
		running = false;
		mNsdManager.unregisterService(mRegistrationListener);
		// mNsdManager.stopServiceDiscovery(mDiscoveryListener); 
		super.onDestroy(); 
	} 
 
	public static void destroy() { 
		try { 
			running = false;
			Log.i(TAG, "Stopping NSD Service");
			mNsdManager.unregisterService(mRegistrationListener);
		} catch(Exception e) {
			Log.e(TAG, "Error: NSD service stopped before being registered");
		} 
	} 
 
	public static void unregisterService() { 
		mNsdManager.unregisterService(mRegistrationListener);
	} 
 
	private static void registerService(int port) {