Share via


CompanionDeviceManager.SetDeviceId(Int32, DeviceId) Method

Definition

Sets the DeviceId deviceId for this association.

[Android.Runtime.Register("setDeviceId", "(ILandroid/companion/DeviceId;)V", "", ApiSince=36)]
public void SetDeviceId(int associationId, Android.Companion.DeviceId? deviceId);
[<Android.Runtime.Register("setDeviceId", "(ILandroid/companion/DeviceId;)V", "", ApiSince=36)>]
member this.SetDeviceId : int * Android.Companion.DeviceId -> unit

Parameters

associationId
Int32

The unique AssociationInfo#getId ID assigned to the Association of the companion device recorded by CompanionDeviceManager.

deviceId
DeviceId

to be used as device identifier to represent the associated device.

Attributes

Remarks

Sets the DeviceId deviceId for this association.

This device id helps the system uniquely identify your device for efficient device management and prevents duplicate entries.

Java documentation for android.companion.CompanionDeviceManager.setDeviceId(int, android.companion.DeviceId).

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