CompanionDeviceManager.HasNotificationAccess(ComponentName) 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.
Check whether the given component can access the notifications via a
NotificationListenerService
Your app must have an association with a device before calling this API
[Android.Runtime.Register("hasNotificationAccess", "(Landroid/content/ComponentName;)Z", "", ApiSince=26)]
public bool HasNotificationAccess (Android.Content.ComponentName? component);
[<Android.Runtime.Register("hasNotificationAccess", "(Landroid/content/ComponentName;)Z", "", ApiSince=26)>]
member this.HasNotificationAccess : Android.Content.ComponentName -> bool
Parameters
- component
- ComponentName
the name of the component
Returns
whether the given component has the notification listener permission
- Attributes
Remarks
Check whether the given component can access the notifications via a NotificationListenerService
Your app must have an association with a device before calling this API
Calling this API requires a uses-feature PackageManager#FEATURE_COMPANION_DEVICE_SETUP
declaration in the manifest
This member is deprecated. Use NotificationManager#isNotificationListenerAccessGranted(ComponentName)
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.