I\'m currently developing an app for Android that uses the NotificationListenerService
, which requires that the user will enable notification access for my app
You can open the NotificationAccessSettingsActivity
by using the following Intent
, but I'm not sure about checking to see if they've already enabled your app.
startActivity(new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"));
Alternatively, for API 22+:
startActivity(new Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS));