Partager via


CompanionDeviceService.OnDeviceAppeared Method

Definition

Overloads

OnDeviceAppeared(AssociationInfo)

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

OnDeviceAppeared(String)

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

OnDeviceAppeared(AssociationInfo)

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

[Android.Runtime.Register("onDeviceAppeared", "(Landroid/companion/AssociationInfo;)V", "GetOnDeviceAppeared_Landroid_companion_AssociationInfo_Handler", ApiSince=33)]
public virtual void OnDeviceAppeared (Android.Companion.AssociationInfo associationInfo);
[<Android.Runtime.Register("onDeviceAppeared", "(Landroid/companion/AssociationInfo;)V", "GetOnDeviceAppeared_Landroid_companion_AssociationInfo_Handler", ApiSince=33)>]
abstract member OnDeviceAppeared : Android.Companion.AssociationInfo -> unit
override this.OnDeviceAppeared : 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 connected.

Java documentation for android.companion.CompanionDeviceService.onDeviceAppeared(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

OnDeviceAppeared(String)

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

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

Parameters

address
String

the MAC address of the device

Attributes

Remarks

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

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

Java documentation for android.companion.CompanionDeviceService.onDeviceAppeared(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