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.
Driver Distraction Guidelines
Stay organized with collections
Save and categorize content based on your preferences.
When Android Automotive apps follow the Driver Distraction Guidelines described
below, the apps can run on the HU when a vehicle is moving. DDG consists of baseline
recommendations provided by Google and are intended to reduce driver distraction.
Apps that meet the Driver Distraction Guidelines can be tagged as
Distraction Optimized. This page details how apps must be tagged
as Distraction Optimized so that the Android platform can enable the apps to run in the User
Experience Restricted state. To learn more about:
Distraction Optimized apps
An app can tag a specific activity to be Distraction Optimized. For an entire app to
be designated as Distraction Optimized, all its activities must adhere to the driver distraction
guidelines. When the driving state of a vehicle changes to a state in which the UX restrictions are
active:
- Current foreground activity can continue to run only when it is tagged as Distraction
Optimized in the manifest.
- When launching a new activity, the new activity is permitted only when it is tagged as
Distraction Optimized in the manifest.
The platform is responsible for checking the manifest and allowing only Distraction Optimized
activities to run in a restricted state.
Note: The platform can't detect or enforce an app's actual
adherence to the restrictions; it can only check an app's declaration in the manifest. Adherence to
these driver distraction guidelines is enforced during the Google Play review process.
Not all app activities need be Distraction Optimized. An app can provide
different user experiences for an unrestricted state (for example, when the vehicle is parked)
versus a more restricted state. As a result, an app can tag a specific activity to be
Distraction Optimized by adding the following metadata to the <activity>
element
in the AndroidManifest.xml
file for the app:
<activity android:name=".DistractionOptimizedMainActivity"....>
....
<meta-data android:name="distractionOptimized" android:value="true"/>
</activity>
Apps that offer activities designed to run in a restricted state must declare that information in
the manifest. The platform looks only at the declared information before determining if the activity
can be permitted to run (or not) in the restricted state.
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 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Driver Distraction Guidelines\n\nWhen Android Automotive apps follow the *Driver Distraction Guidelines* described\nbelow, the apps can run on the HU when a vehicle is moving. DDG consists of baseline\nrecommendations provided by Google and are intended to reduce driver distraction.\n\nApps that meet the Driver Distraction Guidelines can be tagged as\n*Distraction Optimized* . This page details how apps *must* be tagged\nas Distraction Optimized so that the Android platform can enable the apps to run in the User\nExperience Restricted state. To learn more about:\n\n- Car user experience restrictions, see [Car User Experience\n Restrictions](/docs/automotive/driver_distraction/car_uxr).\n- Using car driving state, see [Consuming Car Driving State and\n UX Restrictions](/docs/automotive/driver_distraction/consume).\n\nDistraction Optimized apps\n--------------------------\n\nAn app can tag a specific activity to be Distraction Optimized. For an entire app to\nbe designated as Distraction Optimized, all its activities must adhere to the driver distraction\nguidelines. When the driving state of a vehicle changes to a state in which the UX restrictions are\nactive:\n\n- Current foreground activity can continue to run only when it is tagged as Distraction Optimized in the manifest.\n- When launching a new activity, the new activity is permitted only when it is tagged as Distraction Optimized in the manifest.\n\nThe platform is responsible for checking the manifest and allowing only Distraction Optimized\nactivities to run in a restricted state.\n\n**Note:** The platform can't detect or enforce an app's actual\nadherence to the restrictions; it can only check an app's declaration in the manifest. Adherence to\nthese driver distraction guidelines is enforced during the Google Play review process.\n\nNot all app activities need be Distraction Optimized. An app can provide\ndifferent user experiences for an unrestricted state (for example, when the vehicle is parked)\nversus a more restricted state. As a result, an app can tag a specific activity to be\nDistraction Optimized by adding the following metadata to the `\u003cactivity\u003e` element\nin the `AndroidManifest.xml` file for the app: \n\n```\n\u003cactivity android:name=\".DistractionOptimizedMainActivity\"....\u003e\n....\n\u003cmeta-data android:name=\"distractionOptimized\" android:value=\"true\"/\u003e\n\u003c/activity\u003e\n```\n\nApps that offer activities designed to run in a restricted state must declare that information in\nthe manifest. The platform looks only at the declared information before determining if the activity\ncan be permitted to run (or not) in the restricted state."]]