Compartilhar via


NotificationManager.IsNotificationListenerAccessGranted(ComponentName) Method

Definition

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.

Java documentation for android.app.NotificationManager.isNotificationListenerAccessGranted(android.content.ComponentName).

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