Plan voice actions

To support building features such as an in-app digital assistant, the Android for Cars App Library lets you use the car's microphone to record voice input from the driver. Supporting voice actions helps users complete tasks by talking to Google Assistant, so they can keep their eyes on the road.

When recording is in progress, an indicator appears on the screen. The recording is sent directly to the app (not saved within the library) for processing and follow-up actions.

Google and car makers control how users invoke Google Assistant, typically using a hotword ("Hey, Google" or "Hey, G"), steering wheel button, or onscreen affordance. Once invoked, Google Assistant can recognize a variety of request types, including the following:

  • Play, pause, or skip app-supported categories of media
  • Read and respond to messages
  • Make a call
  • Get driving directions
  • And much more

To optimize the voice experience for users, you need to:

  • Decide which voice action categories to support. Possible categories for voice actions in a media app could include genre, artist, album, playlist, and title. Choose categories that make sense for your app.

  • Anticipate non-specific requests. Decide how you want your app to respond to requests that don't ask for specific content, such as "Play some music" or "Send a text message."

Voice action requirements

Requirement level Requirements
SHOULD Support voice actions for all media categories that are appropriate for their apps.

Sample flow

User action Where action is performed Step count after action
The user taps the app's microphone button (on the action strip) to start voice input.

Navigation template

Navigation template during the user's journey with microphone,
      volume, and settings buttons in the action strip
1
While the user is talking, a visual indicator signals that recording is in progress.

Navigation template

Navigation template during the user's journey with voice overlay
1
A toast message tells the user that the app has understood and responded to the user's spoken instructions.

Navigation template (refresh)

Navigation template during the user's journey with toast message
1