Code example for NsdServiceInfo

Methods: getServiceName

0
		Log.d("NSD", "onDiscoveryStopped: " + serviceType);
	} 
 
	@Override 
	public void onServiceFound(NsdServiceInfo serviceInfo) {
		final String serviceName = serviceInfo.getServiceName();
		if (!serviceMap.containsKey(serviceName)) {
			runOnUiThread(new Runnable() {
				@Override 
				public void run() { 
					adapter.add(serviceName);
					dialog.hide();
				} 
			}); 
		} 
		serviceMap.put(serviceName, serviceInfo);
	} 
 
	@Override 
	public void onServiceLost(NsdServiceInfo serviceInfo) {
		final String serviceName = serviceInfo.getServiceName();
Stop searching for code, let great code find you!  Add Codota to your java IDE