Google Assistant helps drivers perform tasks they're already doing while driving. It reduces distraction by providing glanceable, voice-forward multimodal experiences. Driving mode helps make every drive safer, more informed, connected, and enjoyable.
Using driving mode
A device automatically enters driving mode when you start navigating in Google Maps.
To disable driving mode:
- Navigate to Google Maps Settings > Navigation Settings > Google Assistant settings > Manage Driving Mode.
- Turn off the Driving Mode setting.
In order for driving mode to work correctly with your media app, the app must meet these requirements:
- Follow all the directions in the Google Assistant and media apps
- Your app must declare that it supports media for Android Auto. Follow the directions at declare media support for Android Auto.
- Handle audio focus
PlaybackStateto report errors
- Implement a MediaBrowserService and a MediaSession
- Your MediaSession must implement these callbacks:
- Keep the
MediaSessionmetadata current by calling
Driving mode and playback controls
Each app determines the transport controls that appear on the screen. Do this
by connecting its
For example, a music player usually shows these controls:
Any other supported actions are invoked via voice commands.
Media recommendations in driving mode
Driving mode displays recommendations in two places, the "For you" page and the app's browse page. The screens look similar:
The Assistant calls
with the hint
to retrieve recommendations. You should return a flat list of playable
MediaItem objects. The
app's browse screen displays all the items in the list. The "for you" screen
is not guaranteed to show the recommendations at all if there are less than
15 items in the list.
MediaItem must have media art. You can provide
the type of a
MediaItem by adding a
CONTENT_TYPE key-value pair to the
Bundle in the
MediaDescription of each
MediaItem. This helps improve the item's ranking in the "for you" page.
The possible values for
Use the Media Control test app to verify your app.
It is important to avoid opening a media app in the foreground
while in driving mode. For example, when the Assistant calls
MediaBrowserService.onGetRoot() to retrieve recommendations, your app should
ensure that the state of your
STATE_NONE. This prevents
your app from being brought to the foreground. Currently there is no way for an
app to detect whether it is in driving mode or not.