Code example for NsdManager

Methods: stopServiceDiscovery

0
            mServiceListener);
    } 
     
    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
    private void stopListeningForService() { 
        mNsdManager.stopServiceDiscovery(mServiceListener);
    } 
     
    @Override 
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    	// Check what activity has finished. Depending on that, another activity  
    	// is called or the app closes 
     	if (requestCode == ID_CONNECT_DIALOG) {
    		if (resultCode == Activity.RESULT_CANCELED) {
        		finish();
        	} 
        	if (resultCode == RESULT_CONNECT) {
        		startPlayerDialog(); 
        	} 
        	return; 
    	}