Language

NsdManager.IServiceInfoCallback.OnServiceLost Method

Definition

Overloads

Name Description
OnServiceLost()

Reports when the service that this callback listens to becomes unavailable.

OnServiceLost(NsdServiceInfo)

Reports when the service that this callback listens to becomes unavailable.

OnServiceLost()

Reports when the service that this callback listens to becomes unavailable.

[Android.Runtime.Register("onServiceLost", "()V", "GetOnServiceLostHandler:Android.Net.Nsd.NsdManager/IServiceInfoCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)]
public void OnServiceLost();
[<Android.Runtime.Register("onServiceLost", "()V", "GetOnServiceLostHandler:Android.Net.Nsd.NsdManager/IServiceInfoCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)>]
abstract member OnServiceLost : unit -> unit
Attributes

Remarks

Reports when the service that this callback listens to becomes unavailable.

Called on the executor passed to NsdManager#registerServiceInfoCallback. The service may become available again, in which case #onServiceUpdated will be called.

Java documentation for android.net.nsd.NsdManager.ServiceInfoCallback.onServiceLost().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

OnServiceLost(NsdServiceInfo)

Reports when the service that this callback listens to becomes unavailable.

[Android.Runtime.Register("onServiceLost", "(Landroid/net/nsd/NsdServiceInfo;)V", "GetOnServiceLost_Landroid_net_nsd_NsdServiceInfo_Handler:Android.Net.Nsd.NsdManager/IServiceInfoCallback, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)]
public virtual void OnServiceLost(Android.Net.Nsd.NsdServiceInfo serviceInfo);
[<Android.Runtime.Register("onServiceLost", "(Landroid/net/nsd/NsdServiceInfo;)V", "GetOnServiceLost_Landroid_net_nsd_NsdServiceInfo_Handler:Android.Net.Nsd.NsdManager/IServiceInfoCallback, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=37)>]
abstract member OnServiceLost : Android.Net.Nsd.NsdServiceInfo -> unit
override this.OnServiceLost : Android.Net.Nsd.NsdServiceInfo -> unit

Parameters

serviceInfo
NsdServiceInfo

The service that was lost.

Attributes

Remarks

Reports when the service that this callback listens to becomes unavailable.

Called on the executor passed to NsdManager.registerServiceInfoCallback. The service may become available again, in which case onServiceUpdated(NsdServiceInfo) will be called.

This is called every time a service (as per NsdServiceInfo.getServiceName()) is lost on any Network (as per NsdServiceInfo.getNetwork()) on which it was previously discovered. Therefore, this method may be called multiple times for a given service name, if multiple onServiceUpdated(NsdServiceInfo) callbacks were received for that service name on different networks.

Android reference for android.net.nsd.NsdManager.ServiceInfoCallback.onServiceLost.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to