1 <html devsite> 2 <head> 3 <title>Configuring DND</title> 4 <meta name="project_path" value="/_project.yaml" /> 5 <meta name="book_path" value="/_book.yaml" /> 6 </head> 7 <body> 8 <!-- 9 Copyright 2017 The Android Open Source Project 10 11 Licensed under the Apache License, Version 2.0 (the "License"); 12 you may not use this file except in compliance with the License. 13 You may obtain a copy of the License at 14 15 http://www.apache.org/licenses/LICENSE-2.0 16 17 Unless required by applicable law or agreed to in writing, software 18 distributed under the License is distributed on an "AS IS" BASIS, 19 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 See the License for the specific language governing permissions and 21 limitations under the License. 22 --> 23 24 25 26 <p>Android 7.0 supports the following do not disturb (DND) configurations.</p> 27 28 <h2 id="third_party">Third-party automatic rules</h3> 29 <p>Third-party applications can use the DND Access API to control DND rules:</p> 30 <ul> 31 <li><strong>Applications</strong> can export and list custom DND rules, which 32 appear next to built-in Android DND rules in the DND settings.</li> 33 <li><strong>Users</strong> can access all DND controls for all rules (both 34 automatic and manually-created).</li> 35 <li>The <strong>platform</strong> can implement DND rules from different sources 36 without creating unexpected states.</li> 37 </ul> 38 39 <h2 id="control_alarms">Controlling alarms</h3> 40 <p>When DND mode is enabled, the Android settings UI presents user options for 41 configuring:</p> 42 <ul> 43 <li><strong>DND end condition as next alarm time</strong>. Enables user to set 44 the DND end condition to an alarm. Appears only if an alarm is set for a time 45 within a week from now <em>and</em> the day of the week for that alarm is 46 <em>not</em> the same day of the week as today. (Not supported for automatic 47 rules.)</li> 48 <li><strong>Alarm can override end time</strong>. Enables users to configure the 49 DND end condition as a specific time or next alarm (whichever comes first).</li> 50 </ul> 51 52 <h2 id="suppress_vis_distract">Suppressing visual distractions</h3> 53 <p>The Android settings UI presents user options for suppressing visual 54 distractions such as heads up notifications, fullscreen intents, ambient 55 display, and LED notification lights.</p> 56 57 <h2 id="implementation">Customizing DND settings</h2> 58 <p>When customizing settings, OEMs must preserve the AOSP behavior of the system 59 APIs and maintain the behavior of DND settings. Specifically, the DND settings 60 page in system settings must include the following:</p> 61 <ul> 62 <li><strong>Application-provided DND rules</strong>. These automated DND rules 63 must include active rules instances and rule listings in the Add Rule menu.</li> 64 <li><strong>Pre-loaded application DND rules</strong>. OEMs can provide DND 65 rules that appear next to end user manually-created rules.</li> 66 </ul> 67 <p>For details on new DND APIs, refer to 68 <code><a href="https://developer.android.com/reference/android/service/notification/package-summary.html">android.service.notification</a></code> 69 reference documentation.</p> 70 71 </body> 72 </html> 73