blob: 5588d317386723a3aa5773f40d15ebe883264452 [file] [log] [blame]
page.title=Configuring DND
@jd:body
<!--
Copyright 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div id="qv-wrapper">
<div id="qv">
<h2>In this document</h2>
<ol id="auto-toc">
</ol>
</div>
</div>
<p>Android 7.0 supports the following do not disturb (DND) configurations.</p>
<h2 id="third_party">Third-party automatic rules</h3>
<p>Third-party applications can use the DND Access API to control DND rules:</p>
<ul>
<li><strong>Applications</strong> can export and list custom DND rules, which
appear next to built-in Android DND rules in the DND settings.</li>
<li><strong>Users</strong> can access all DND controls for all rules (both
automatic and manually-created).</li>
<li>The <strong>platform</strong> can implement DND rules from different sources
without creating unexpected states.</li>
</ul>
<h2 id="control_alarms">Controlling alarms</h3>
<p>When DND mode is enabled, the Android settings UI presents user options for
configuring:</p>
<ul>
<li><strong>DND end condition as next alarm time</strong>. 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 <em>and</em> the day of the week for that alarm is
<em>not</em> the same day of the week as today. (Not supported for automatic
rules.)</li>
<li><strong>Alarm can override end time</strong>. Enables users to configure the
DND end condition as a specific time or next alarm (whichever comes first).</li>
</ul>
<h2 id="suppress_vis_distract">Suppressing visual distractions</h3>
<p>The Android settings UI presents user options for suppressing visual
distractions such as heads up notifications, fullscreen intents, ambient
display, and LED notification lights.</p>
<h2 id="implementation">Customizing DND settings</h2>
<p>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:</p>
<ul>
<li><strong>Application-provided DND rules</strong>. These automated DND rules
must include active rules instances and rule listings in the Add Rule menu.</li>
<li><strong>Pre-loaded application DND rules</strong>. OEMs can provide DND
rules that appear next to end user manually-created rules.</li>
</ul>
<p>For details on new DND APIs, refer to
<code><a href="https://developer.android.com/reference/android/service/notification/package-summary.html">android.service.notification</a></code>
reference documentation.</p>