Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Do not disturb
Stay organized with collections
Save and categorize content based on your preferences.
Android 7.0 supports the following do not disturb (DND) configurations.
Third-party automatic rules
Third-party applications can use the DND Access API to control DND rules:
- Applications can export and list custom DND rules, which
appear next to built-in Android DND rules in the DND settings.
- Users can access all DND controls for all rules (both
automatic and manually-created).
- The platform can implement DND rules from different sources
without creating unexpected states.
Control alarms
When DND mode is enabled, the Android settings UI presents user options for
configuring:
- DND end condition as next alarm time. Enables user to set
the DND end condition to an alarm. Appears only if an alarm is set for a time
within a week from now and the day of the week for that alarm is
not the same day of the week as today. (Not supported for automatic
rules.)
- Alarm can override end time. Enables users to configure the
DND end condition as a specific time or next alarm (whichever comes first).
Suppress visual distractions
The Android settings UI presents user options for suppressing visual
distractions such as heads up notifications, fullscreen intents, ambient
display, and LED notification lights.
Customize DND settings
When customizing settings, OEMs must preserve the AOSP behavior of the system
APIs and maintain the behavior of DND settings. Specifically, the DND settings
page in system settings must include the following:
- Application-provided DND rules. These automated DND rules
must include active rules instances and rule listings in the Add Rule menu.
- Pre-loaded application DND rules. OEMs can provide DND
rules that appear next to end user manually-created rules.
For details on new DND APIs, refer to
android.service.notification
reference documentation.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-08-26 UTC.
[null,null,["Last updated 2024-08-26 UTC."],[],[],null,["# Do not disturb\n\nAndroid 7.0 supports the following do not disturb (DND) configurations.\n\nThird-party automatic rules\n---------------------------\n\nThird-party applications can use the DND Access API to control DND rules:\n\n- **Applications** can export and list custom DND rules, which appear next to built-in Android DND rules in the DND settings.\n- **Users** can access all DND controls for all rules (both automatic and manually-created).\n- The **platform** can implement DND rules from different sources without creating unexpected states.\n\nControl alarms\n--------------\n\nWhen DND mode is enabled, the Android settings UI presents user options for\nconfiguring:\n\n- **DND end condition as next alarm time** . Enables user to set the DND end condition to an alarm. Appears only if an alarm is set for a time within a week from now *and* the day of the week for that alarm is *not* the same day of the week as today. (Not supported for automatic rules.)\n- **Alarm can override end time**. Enables users to configure the DND end condition as a specific time or next alarm (whichever comes first).\n\nSuppress visual distractions\n----------------------------\n\nThe Android settings UI presents user options for suppressing visual\ndistractions such as heads up notifications, fullscreen intents, ambient\ndisplay, and LED notification lights.\n\nCustomize DND settings\n----------------------\n\nWhen customizing settings, OEMs must preserve the AOSP behavior of the system\nAPIs and maintain the behavior of DND settings. Specifically, the DND settings\npage in system settings must include the following:\n\n- **Application-provided DND rules**. These automated DND rules must include active rules instances and rule listings in the Add Rule menu.\n- **Pre-loaded application DND rules**. OEMs can provide DND rules that appear next to end user manually-created rules.\n\nFor details on new DND APIs, refer to\n[android.service.notification](https://developer.android.com/reference/android/service/notification/package-summary.html)\nreference documentation."]]