NotificationManager.IsNotificationListenerAccessGranted(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.
Checks whether the user has approved a given
android.service.notification.NotificationListenerService
.
[Android.Runtime.Register("isNotificationListenerAccessGranted", "(Landroid/content/ComponentName;)Z", "GetIsNotificationListenerAccessGranted_Landroid_content_ComponentName_Handler", ApiSince=27)]
public virtual bool IsNotificationListenerAccessGranted (Android.Content.ComponentName? listener);
[<Android.Runtime.Register("isNotificationListenerAccessGranted", "(Landroid/content/ComponentName;)Z", "GetIsNotificationListenerAccessGranted_Landroid_content_ComponentName_Handler", ApiSince=27)>]
abstract member IsNotificationListenerAccessGranted : Android.Content.ComponentName -> bool
override this.IsNotificationListenerAccessGranted : Android.Content.ComponentName -> bool
Parameters
- listener
- ComponentName
Returns
- Attributes
Remarks
Checks whether the user has approved a given android.service.notification.NotificationListenerService
.
The listener service must belong to the calling app.
Apps can request notification listener access by sending the user to the activity that matches the system intent action android.provider.Settings#ACTION_NOTIFICATION_LISTENER_SETTINGS
.
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.