Code example for NsdManager

Methods: resolveService

0
	 *  
	 * @param data 
	 */ 
	public void connect(NsdServiceInfo data) {
		ResolveListener listener = generateResolveListener();
		mNsdManager.resolveService(data, listener);
	} 
 
	void registerService(int port) {
		if (mServiceName == null) {
			throw new IllegalStateException();
		} 
		NsdServiceInfo serviceInfo = new NsdServiceInfo();
		serviceInfo.setPort(port);
		serviceInfo.setServiceName(mServiceName);
		serviceInfo.setServiceType(sServiceType);
 
		Log.d(TAG, "registerService service=" + serviceInfo);
 
		mRegistrationListener = generateRegistrationListener();
Connect your IDE to all the code out there  Get Codota for Java