Udostępnij za pośrednictwem


CompanionDeviceManager.StopObservingDevicePresence Method

Definition

Overloads

StopObservingDevicePresence(ObservingDevicePresenceRequest)

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

StopObservingDevicePresence(String)

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

StopObservingDevicePresence(ObservingDevicePresenceRequest)

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

[Android.Runtime.Register("stopObservingDevicePresence", "(Landroid/companion/ObservingDevicePresenceRequest;)V", "", ApiSince=36)]
[Android.Runtime.RequiresPermission("android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE")]
public void StopObservingDevicePresence(Android.Companion.ObservingDevicePresenceRequest request);
[<Android.Runtime.Register("stopObservingDevicePresence", "(Landroid/companion/ObservingDevicePresenceRequest;)V", "", ApiSince=36)>]
[<Android.Runtime.RequiresPermission("android.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE")>]
member this.StopObservingDevicePresence : Android.Companion.ObservingDevicePresenceRequest -> unit

Parameters

request
ObservingDevicePresenceRequest

A request for setting the types of device for observing device presence.

Attributes

Remarks

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

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

Java documentation for android.companion.CompanionDeviceManager.stopObservingDevicePresence(android.companion.ObservingDevicePresenceRequest).

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

StopObservingDevicePresence(String)

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.

This member is deprecated. use #stopObservingDevicePresence(ObservingDevicePresenceRequest) instead.

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