Code example for NsdManager

Methods: discoverServices

    public void discoverService() { 
        bDiscoverying = true;
        mNsdManager.discoverServices(SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD,
    public void initializeRegistrationListener() { 
        mRegistrationListener = new NsdManager.RegistrationListener() {
            public void onServiceRegistered(NsdServiceInfo NsdServiceInfo) {
                // Save the service name. Android may have changed it in order 
                // to 
                // resolve a conflict, so update the name you initially 
                // requested 
                // with the name Android actually used. 
Contextual code suggestions in your IDE  Get Codota for Java