Sdílet prostřednictvím


CompanionDeviceManager.Disassociate Method

Definition

Overloads

Disassociate(Int32)

Remove an association.

Disassociate(String)

Remove the association between this app and the device with the given mac address.

Disassociate(Int32)

Remove an association.

[Android.Runtime.Register("disassociate", "(I)V", "", ApiSince=33)]
public void Disassociate (int associationId);
[<Android.Runtime.Register("disassociate", "(I)V", "", ApiSince=33)>]
member this.Disassociate : int -> unit

Parameters

associationId
Int32

id of the association to be removed.

Attributes

Remarks

Remove an association.

Any privileges provided via being associated with a given device will be revoked

Calling this API requires a uses-feature PackageManager#FEATURE_COMPANION_DEVICE_SETUP declaration in the manifest

Java documentation for android.companion.CompanionDeviceManager.disassociate(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

Disassociate(String)

Remove the association between this app and the device with the given mac address.

[Android.Runtime.Register("disassociate", "(Ljava/lang/String;)V", "", ApiSince=26)]
public void Disassociate (string deviceMacAddress);
[<Android.Runtime.Register("disassociate", "(Ljava/lang/String;)V", "", ApiSince=26)>]
member this.Disassociate : string -> unit

Parameters

deviceMacAddress
String

the MAC address of device to disassociate from this app. Device address is case-sensitive in API level &lt; 33.

Attributes

Remarks

Remove the association between this app and the device with the given mac address.

Any privileges provided via being associated with a given device will be revoked

Consider doing so when the association is no longer relevant to avoid unnecessary battery and/or data drain resulting from special privileges that the association provides

Calling this API requires a uses-feature PackageManager#FEATURE_COMPANION_DEVICE_SETUP declaration in the manifest

This member is deprecated. use #disassociate(int)

Java documentation for android.companion.CompanionDeviceManager.disassociate(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