CompanionDeviceManager.StopObservingDevicePresence Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| StopObservingDevicePresence(ObservingDevicePresenceRequest) |
Unregisters the device presence callbacks that |
| StopObservingDevicePresence(String) |
Unregister for receiving callbacks whenever the associated device comes in and out of range. |
StopObservingDevicePresence(ObservingDevicePresenceRequest)
Unregisters the device presence callbacks that request selects.
[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
Unregisters the device presence callbacks that request selects. The request can select a device by association ID or Bluetooth service UUID. A UUID request does not need an association.
Calling app must check for feature presence of PackageManager#FEATURE_COMPANION_DEVICE_SETUP before calling this API.
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.
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.