Partager via


CompanionDeviceService.OnDeviceDisappeared Method

Definition

Overloads

OnDeviceDisappeared(AssociationInfo)

Called by system whenever a device associated with this app is disconnected.

OnDeviceDisappeared(String)

Called by system whenever a device associated with this app stops being available.

OnDeviceDisappeared(AssociationInfo)

Called by system whenever a device associated with this app is disconnected.

[Android.Runtime.Register("onDeviceDisappeared", "(Landroid/companion/AssociationInfo;)V", "GetOnDeviceDisappeared_Landroid_companion_AssociationInfo_Handler", ApiSince=33)]
public virtual void OnDeviceDisappeared (Android.Companion.AssociationInfo associationInfo);
[<Android.Runtime.Register("onDeviceDisappeared", "(Landroid/companion/AssociationInfo;)V", "GetOnDeviceDisappeared_Landroid_companion_AssociationInfo_Handler", ApiSince=33)>]
abstract member OnDeviceDisappeared : Android.Companion.AssociationInfo -> unit
override this.OnDeviceDisappeared : Android.Companion.AssociationInfo -> unit

Parameters

associationInfo
AssociationInfo

A record for the companion device.

Attributes

Remarks

Called by system whenever a device associated with this app is disconnected.

Java documentation for android.companion.CompanionDeviceService.onDeviceDisappeared(android.companion.AssociationInfo).

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

OnDeviceDisappeared(String)

Called by system whenever a device associated with this app stops being available.

[Android.Runtime.Register("onDeviceDisappeared", "(Ljava/lang/String;)V", "GetOnDeviceDisappeared_Ljava_lang_String_Handler", ApiSince=31)]
public virtual void OnDeviceDisappeared (string address);
[<Android.Runtime.Register("onDeviceDisappeared", "(Ljava/lang/String;)V", "GetOnDeviceDisappeared_Ljava_lang_String_Handler", ApiSince=31)>]
abstract member OnDeviceDisappeared : string -> unit
override this.OnDeviceDisappeared : string -> unit

Parameters

address
String

the MAC address of the device

Attributes

Remarks

Called by system whenever a device associated with this app stops being available.

Usually this means the device goes out of range or is turned off.

This member is deprecated. please override #onDeviceDisappeared(AssociationInfo) instead.

Java documentation for android.companion.CompanionDeviceService.onDeviceDisappeared(java.lang.String).

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