lightbulb_outline Please take our October 2018 developer survey. Start survey
added in API level 16

NsdManager.DiscoveryListener

public static interface NsdManager.DiscoveryListener

android.net.nsd.NsdManager.DiscoveryListener


Interface for callback invocation for service discovery

Summary

Public methods

abstract void onDiscoveryStarted(String serviceType)
abstract void onDiscoveryStopped(String serviceType)
abstract void onServiceFound(NsdServiceInfo serviceInfo)
abstract void onServiceLost(NsdServiceInfo serviceInfo)
abstract void onStartDiscoveryFailed(String serviceType, int errorCode)
abstract void onStopDiscoveryFailed(String serviceType, int errorCode)

Public methods

onDiscoveryStarted

added in API level 16
public abstract void onDiscoveryStarted (String serviceType)

Parameters
serviceType String

onDiscoveryStopped

added in API level 16
public abstract void onDiscoveryStopped (String serviceType)

Parameters
serviceType String

onServiceFound

added in API level 16
public abstract void onServiceFound (NsdServiceInfo serviceInfo)

Parameters
serviceInfo NsdServiceInfo

onServiceLost

added in API level 16
public abstract void onServiceLost (NsdServiceInfo serviceInfo)

Parameters
serviceInfo NsdServiceInfo

onStartDiscoveryFailed

added in API level 16
public abstract void onStartDiscoveryFailed (String serviceType, 
                int errorCode)

Parameters
serviceType String

errorCode int

onStopDiscoveryFailed

added in API level 16
public abstract void onStopDiscoveryFailed (String serviceType, 
                int errorCode)

Parameters
serviceType String

errorCode int