ResolveListener
interface ResolveListener
android.net.nsd.NsdManager.ResolveListener |
Callback for use with android.net.nsd.NsdManager#resolveService to resolve the service info and use with NsdManager#stopServiceResolution
to stop resolution.
Summary
Public methods | |
---|---|
open Unit |
onResolutionStopped(serviceInfo: NsdServiceInfo) Called on the internal thread or with an executor passed to android. |
abstract Unit |
onResolveFailed(serviceInfo: NsdServiceInfo!, errorCode: Int) Called on the internal thread or with an executor passed to android. |
abstract Unit |
onServiceResolved(serviceInfo: NsdServiceInfo!) Called on the internal thread or with an executor passed to android. |
open Unit |
onStopResolutionFailed(serviceInfo: NsdServiceInfo, errorCode: Int) Called once on the internal thread or with an executor passed to android. |
Public methods
onResolutionStopped
open fun onResolutionStopped(serviceInfo: NsdServiceInfo): Unit
Called on the internal thread or with an executor passed to android.net.nsd.NsdManager#resolveService to report the resolution was stopped. A stop resolution operation would call either onResolutionStopped or onStopResolutionFailed once based on the result.
Parameters | |
---|---|
serviceInfo |
NsdServiceInfo: This value cannot be null . |
onResolveFailed
abstract fun onResolveFailed(
serviceInfo: NsdServiceInfo!,
errorCode: Int
): Unit
Called on the internal thread or with an executor passed to android.net.nsd.NsdManager#resolveService to report the resolution was failed with an error. A resolution operation would call either onServiceResolved or onResolveFailed once based on the result.
onServiceResolved
abstract fun onServiceResolved(serviceInfo: NsdServiceInfo!): Unit
Called on the internal thread or with an executor passed to android.net.nsd.NsdManager#resolveService to report the resolved service info. A resolution operation would call either onServiceResolved or onResolveFailed once based on the result.
onStopResolutionFailed
open fun onStopResolutionFailed(
serviceInfo: NsdServiceInfo,
errorCode: Int
): Unit
Called once on the internal thread or with an executor passed to android.net.nsd.NsdManager#resolveService to report that stopping resolution failed with an error. A stop resolution operation would call either onResolutionStopped or onStopResolutionFailed once based on the result.
Parameters | |
---|---|
serviceInfo |
NsdServiceInfo: This value cannot be null . |
errorCode |
Int: Value is android.net.nsd.NsdManager#FAILURE_OPERATION_NOT_RUNNING |