Check if user has granted NotificationListener access to my app
问题 I'm using this code to open Notification Listener Settings: startActivity(new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS")); I would like to check if the user has granted authorization to my app. I already tried to check if my NotificationListenerService is running, but it seems that it gets halted and restarted by the system (even if I return START_STICKY). 回答1: The only correct way to do it is to check the secure settings: ComponentName cn = new ComponentName(context,