Code example for NsdManager

Methods: stopServiceDiscovery

0
 
	        @Override 
	        public void onStartDiscoveryFailed(String serviceType, int errorCode) 
	        { 
	            Log.e(TAG, "Discovery failed: Error code:" + errorCode);
	            mNsdManager.stopServiceDiscovery(this);
	        } 
 
	        @Override 
	        public void onStopDiscoveryFailed(String serviceType, int errorCode) 
	        { 
	            Log.e(TAG, "Discovery failed: Error code:" + errorCode);
	            mNsdManager.stopServiceDiscovery(this);
	        } 
	    }; 
	} 
	 
	public void initializeResolveListener()  
	{ 
	    mResolveListener = new NsdManager.ResolveListener()
	    {