# Plan communications

<br />

Understand the range of ways your app can communicate with users, then choose
the most appropriate option for each use case.

Your app can communicate with users by means of using toasts,
notifications, and navigation alerts, as well as by using message-oriented
templates or [voice input](https://developers.google.com/cars/design/create-apps/apps-for-drivers/plan-communications#voice). Follow best practices when using voice input
in your app, to protect user privacy and brand the experience.

When your app needs to communicate with users, choose the most appropriate of
the available methods:

| Communication method | Format | Example use case |
|---|---|---|
| [Message template](https://developers.google.com/cars/design/create-apps/apps-for-drivers/templates/message-template) | Brief message with icon or image + up to 4 actions | Error message |
| [Long Message template](https://developers.google.com/cars/design/create-apps/apps-for-drivers/templates/long-message-template) | Long, scrollable message to be read while parked | Legal text for permissions |
| [Toast](https://developer.android.com/guide/topics/ui/notifiers/toasts) | Pop-up showing very brief text | Telling the user to continue a flow on the phone when parked |
| [Voice input](https://developers.google.com/cars/design/create-apps/apps-for-drivers/plan-communications#voice) | Input provided via microphone and recorded by the app | User makes a request of the app while driving |
| [Navigation alerts](https://developers.google.com/cars/design/create-apps/apps-for-drivers/templates/navigation-template#alerts) | Brief message with optional actions on the [Navigation template](https://developers.google.com/cars/design/create-apps/apps-for-drivers/templates/navigation-template) (doesn't block navigation info) | Suggesting a change in route |
| [Heads-up notifications (HUNs)](https://developers.google.com/cars/design/android-auto/product-experience/system-ui/notifications#heads-up_notification_hun) | Temporary notification card with brief text + up to 2 actions, able to deep-link to relevant parts of the app | Highly important update worth disrupting other tasks (use outside of the Navigation template) |

More about notifications:

- Be aware that vehicle OEMs can decide whether to display navigation HUNs in the AAOS version of your app.
- For details about types of notifications used by navigation apps, refer to [Navigation notifications: Turn-by-turn (TBT) and regular](https://developers.google.com/cars/design/create-apps/apps-for-drivers/templates/navigation-template#notifications).
- For technical details about displaying notifications in Android for Cars, refer to [Display notifications](https://developer.android.com/training/cars/apps#display-notifications).
- And for additional details relevant to AAOS, visit [Notifications on Android Automotive OS](https://developer.android.com/training/cars/notifications).

## Voice input details

The voice input feature lets apps access the car's microphone to gather audio
input for purposes such as creating their own in-app assistant.

### How it works

![Navigation template with voice input icon](https://developers.google.com/static/cars/design/create-apps/apps-for-drivers/images/voice-input.png) A voice input icon appears to inform the user that they can provide voice input.

1. The user requests voice input (via the microphone icon in the action strip, in this case).
2. An overlay appears, signaling that recording is in process.
3. Users can stop the recording by dismissing the overlay, or they can stop talking, at which point the app should stop recording.

For a sample flow showing this process, see
[Communicate with the app by voice](https://developers.google.com/cars/design/create-apps/sample-flows/communicate-with-voice).

### Best practices

Keep the following best practices in mind as you develop apps:

- **Get permission first.** Make sure the user has granted permission for your app to access the car's microphone (ideally before the drive starts).
- **Provide an entry point.** Give the user a way to start voice input, such as a microphone icon in the action strip. Then, wait for them to initiate the process.
- **Brand the experience.** When creating an in-app assistant, make clear that it's an assistant specific to your app.
- **Stop when the user does.** When the user is done talking, stop recording.