What’s the Intent to open DND settings?


I’m sure I’m overlooking something in the Settings class documentation. What Intent can open the Settings app in the “Do not disturb” section?

I expected it to be the ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS action, but that is only for the screen which lists which apps have requested DND access.



Looking at the AndroidManifest.xml for the Settings app there is an Activity Settings$ZenModeSettingsActivity already from Android 5.0.

To send the user to the “Do not disturb” screen you can use the action android.settings.ZEN_MODE_SETTINGS like this:

try {
    startActivity(new Intent("android.settings.ZEN_MODE_SETTINGS"));
} catch (ActivityNotFoundException e) {
    // TODO: Handle activity not found

Original answer

It looks like there are no screens in the Settings app (at least on Android 6+7) where you can enable/disable DND. It seems like this is only available through the settings tile (and can be disabled in the dialog when changing the volume).

I have a Samsung S6 (Android 6.0.1) which has this screen, but this is probably some custom Samsung changes. The screen is represented by the class com.android.settings.Settings$ZenModeDNDSettingsActivity which can be started by any app. This might be of help for some people out there.

AndroidManifest.xml for Settings app for Android 6+7:

Answered By – Roy Solberg

Leave a Comment