- serviceInfo
- The service being registered
- protocolType
- The service discovery protocol
- listener
- The listener notifies of a successful registration and is used to unregister this service through a call on NsdManager.UnregisterService(.IRegistrationListener). Cannot be null. Cannot be in use for an active service registration.
Register a service to be discovered by other services.
The function call immediately returns after sending a request to register service to the framework. The application is notified of a successful registration through the callback NoType:android/net/nsd/NsdManager$RegistrationListener;Href=../../../../reference/android/net/nsd/NsdManager.RegistrationListener.html#onServiceRegistered(android.net.nsd.NsdServiceInfo) or a failure through NoType:android/net/nsd/NsdManager$RegistrationListener;Href=../../../../reference/android/net/nsd/NsdManager.RegistrationListener.html#onRegistrationFailed(android.net.nsd.NsdServiceInfo, int).
The application should call NsdManager.UnregisterService(.IRegistrationListener) when the service registration is no longer required, and/or whenever the application is stopped.