Share via


DiscoverySessionCallback.OnServiceLost(PeerHandle, Int32) Method

Definition

Called when the discovered service is not available.

[Android.Runtime.Register("onServiceLost", "(Landroid/net/wifi/aware/PeerHandle;I)V", "GetOnServiceLost_Landroid_net_wifi_aware_PeerHandle_IHandler", ApiSince=31)]
public virtual void OnServiceLost (Android.Net.Wifi.Aware.PeerHandle peerHandle, int reason);
[<Android.Runtime.Register("onServiceLost", "(Landroid/net/wifi/aware/PeerHandle;I)V", "GetOnServiceLost_Landroid_net_wifi_aware_PeerHandle_IHandler", ApiSince=31)>]
abstract member OnServiceLost : Android.Net.Wifi.Aware.PeerHandle * int -> unit
override this.OnServiceLost : Android.Net.Wifi.Aware.PeerHandle * int -> unit

Parameters

peerHandle
PeerHandle

An opaque handle to the peer matching our discovery operation.

reason
Int32

Discovered service lost reason code. One of WifiAwareManager#WIFI_AWARE_DISCOVERY_LOST_REASON_PEER_NOT_VISIBLE, WifiAwareManager#WIFI_AWARE_DISCOVERY_LOST_REASON_UNKNOWN

Attributes

Remarks

Called when the discovered service is not available. All further operations on this discovery session will fail. If the service is available again, #onServiceDiscovered(PeerHandle, byte[], List) or #onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int) will be called.

Java documentation for android.net.wifi.aware.DiscoverySessionCallback.onServiceLost(android.net.wifi.aware.PeerHandle, int).

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