2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
サイレント モード
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android 7.0 では、次のサイレント モード(DND)構成がサポートされています。
サードパーティの自動化ルール
サードパーティ製アプリは、DND Access API を使用して DND ルールを制御できます。
- アプリは、カスタム DND ルールをエクスポートして、一覧表示できます。これらのルールは DND 設定で組み込み Android DND ルールの横に表示されます。
- ユーザーは、自動作成か手動作成かを問わず、すべてのルールの DND 制御を利用できます。
- プラットフォームは、予期しない状態を発生させることなく、さまざまなソースから DND ルールを実装できます。
アラームを制御する
DND モードを有効にすると、Android の設定 UI に、以下を構成するユーザー オプションが表示されます。
- DND 終了条件を次回のアラーム時刻とする: ユーザーは、DND 終了条件をアラームに設定できます。このオプションは、アラームが今日から 1 週間以内の時刻に設定されており、アラームの曜日が今日と同じ曜日でない場合にのみ、表示されます(自動化ルールではサポートされていません)。
- 終了時刻よりアラームを優先: ユーザーは、DND 終了条件を特定の時刻または次回のアラームのうち早いほうの時刻として設定できます。
注意をそらす視覚要素を抑制する
Android の設定 UI には、ヘッドアップ通知、全画面表示インテント、アンビエント表示、LED 通知ライトなど、注意をそらす視覚要素を抑制するユーザー オプションがあります。
DND 設定をカスタマイズする
設定をカスタマイズする場合、OEM はシステム API の AOSP 動作を保持し、DND 設定の動作を維持する必要があります。具体的には、システム設定の DND 設定ページに次の情報を含めます。
- アプリが提供する DND ルール: これらの自動化 DND ルールでは、[ルールを追加] メニューに有効なルール インスタンスとルールリストが含まれている必要があります。
- プリロードされたアプリの DND ルール: OEM は、エンドユーザーが手動で作成したルールの横に表示される DND ルールを提供できます。
新しい DND API の詳細については、android.service.notification
リファレンス ドキュメントをご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 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."]]