Share via


CompanionDeviceManager.StopObservingDevicePresence(String) Method

Definition

Unregister for receiving callbacks whenever the associated device comes in and out of range.

[Android.Runtime.Register("stopObservingDevicePresence", "(Ljava/lang/String;)V", "", ApiSince=31)]
[Android.Runtime.RequiresPermission("android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE")]
public void StopObservingDevicePresence (string deviceAddress);
[<Android.Runtime.Register("stopObservingDevicePresence", "(Ljava/lang/String;)V", "", ApiSince=31)>]
[<Android.Runtime.RequiresPermission("android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE")>]
member this.StopObservingDevicePresence : string -> unit

Parameters

deviceAddress
String

a previously-associated companion device's address

Attributes

Remarks

Unregister for receiving callbacks whenever the associated device comes in and out of range.

The provided device must be #associate associated with the calling app before calling this method.

Calling app must declare uses-permission android.Manifest.permission#REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE.

Calling app must check for feature presence of PackageManager#FEATURE_COMPANION_DEVICE_SETUP before calling this API.

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