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