Share via


CompanionDeviceManager.Associate Method

Definition

Overloads

Associate(AssociationRequest, CompanionDeviceManager+Callback, Handler)

Associate this app with a companion device, selected by user

Associate(AssociationRequest, IExecutor, CompanionDeviceManager+Callback)

Associate(AssociationRequest, CompanionDeviceManager+Callback, Handler)

Associate this app with a companion device, selected by user

[Android.Runtime.Register("associate", "(Landroid/companion/AssociationRequest;Landroid/companion/CompanionDeviceManager$Callback;Landroid/os/Handler;)V", "", ApiSince=26)]
public void Associate (Android.Companion.AssociationRequest request, Android.Companion.CompanionDeviceManager.Callback callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("associate", "(Landroid/companion/AssociationRequest;Landroid/companion/CompanionDeviceManager$Callback;Landroid/os/Handler;)V", "", ApiSince=26)>]
member this.Associate : Android.Companion.AssociationRequest * Android.Companion.CompanionDeviceManager.Callback * Android.OS.Handler -> unit

Parameters

request
AssociationRequest

specific details about this request

callback
CompanionDeviceManager.Callback

will be called once there's at least one device found for user to choose from

handler
Handler

A handler to control which thread the callback will be delivered on, or null, to deliver it on main thread

Attributes

Remarks

Java documentation for android.companion.CompanionDeviceManager.associate(android.companion.AssociationRequest, android.companion.Callback, android.os.Handler).

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

Associate(AssociationRequest, IExecutor, CompanionDeviceManager+Callback)

[Android.Runtime.Register("associate", "(Landroid/companion/AssociationRequest;Ljava/util/concurrent/Executor;Landroid/companion/CompanionDeviceManager$Callback;)V", "", ApiSince=33)]
public void Associate (Android.Companion.AssociationRequest request, Java.Util.Concurrent.IExecutor executor, Android.Companion.CompanionDeviceManager.Callback callback);
[<Android.Runtime.Register("associate", "(Landroid/companion/AssociationRequest;Ljava/util/concurrent/Executor;Landroid/companion/CompanionDeviceManager$Callback;)V", "", ApiSince=33)>]
member this.Associate : Android.Companion.AssociationRequest * Java.Util.Concurrent.IExecutor * Android.Companion.CompanionDeviceManager.Callback -> unit

Parameters

executor
IExecutor
Attributes

Applies to