While developing your app, there are tools available to run Android Auto and Android Automotive OS on your development computer. See Test your app using the Desktop Head Unit for details on how to install and use the Desktop Head Unit to run Android Auto apps. See Test your app using the Android Automotive OS emulator for details on how to install and run Android Automotive OS images.
Test in real vehicles
To test your app in real vehicles, it must be installed from a trusted source such as the Play Store. During the early phases of development, you can use Internal App Sharing or an Internal Test Track to distribute your app to devices without going through the Play Store review process.
Enable Android Auto developer mode
In addition to the Android developer options (usable on both Android Auto and Android Automotive OS), Android Auto has its own developer mode that can be used to improve the development experience. To enable it, follow these steps:
Open the Android Auto settings.
- Android 10 or higher: on the device, tap Settings > Apps & notifications > See all apps > Android Auto > Advanced > Additional settings in the app.
- Android 9 or lower: in the Android Auto app, tap the menu, then tap Settings.
Scroll to the About section near the bottom and tap Version to display the version and permission information.
Tap the Version and permission info section 10 times.
The Allow development settings? dialog appears.
Developer mode is now enabled, and you can access developer options in the overflow menu. You only need to enable developer mode once. To quit developer mode, use the option from the drop-down menu in the app bar.
Additional testing requirements for media apps
If you are testing a media app, test for the scenarios that are covered in this section in addition to testing your app on Android Auto, Android Automotive OS, or both.
Test MediaBrowserService startup scenarios
To help keep drivers and passengers safe, users have additional restrictions on
how they can interact with apps while driving. For this reason, Android Auto and
Android Automotive OS have some
startup scenarios that your app must be able to handle so that users can
continue to enjoy your content while they're on the road.
Test your app to make sure it can handle each of the following scenarios:
MediaBrowserServiceis run before any
MediaBrowserServiceis run when no
Activitycan be shown.
MediaBrowserServiceis run when the user is not signed in.
While testing for these scenarios, be sure to try the following methods:
- Force stop the media app, then launch Android Auto or Android Automotive OS.
- Clear the media app data, then launch Android Auto or Android Automotive OS.
Also make sure to set an appropriate error message when necessary.
Use the Media Controller Test app
The Media Controller Test app lets you test the intricacies of media playback on Android and helps verify your media session implementation. To get started with this tool, see Using the media controller test app.