Welcome to the final episode of the tour around the Android platforms.
In the previous
Preparing the project
Before you begin working with Android auto app, create or update a project with target API level 21 (Android 5.0). You don’t have to worry about vehicle-specific hardware differences. If you want to create an application which uses notifications, you will need to support the v4 library. It provides classes compatible with Android Auto devices.
Google is strict in terms of driver distraction. As a developer you have to specify the capabilities your app uses in an XML file that you place in your project’s resources directory (res/xml/). Auto currently
- media - Audio apps.
- notification - Messaging apps.
If your application extends an audio application for Auto, create a file called automotive_app_desc.xml and store it in your
<automotiveApp> <uses name="media"/> </automotiveApp>
<application> ... <meta-data android:name="com.google.android.gms.car.application" android:resource="@xml/automotive_app_desc"/> </application>
Caution: You can define many capabilities that your app uses.
Google takes driver distraction very seriously. That is why they impose restrictions and provide safety standards. Your app must meet specific design requirements to qualify as an Auto app on Google Play.
- The app should minimize distractions faced by the driver.
- Use voice commands and reduce manual interactions.
- The UI should be simple and predictable. (Guidelines).
- The app should only send notifications when they are relevant.
- Use large fonts and buttons.
- Again! Only Audio and messaging apps are available (no games, video players etc.).
- A soft keyboard appears when the car is parked.
- Use the Android Auto Desktop Head Unit (DHU) to validate each checklist item.
- Install your app from the Google Play Store,
otherwiseit won't work.
Testing your app
Testing an Auto app is substantially different from testing other types of Android apps. Google doesn't provide emulators that you could use like it does in case of mobile apps. Instead, Google gives the Desktop Head Unit (DHU) - a testing tool for Auto apps that lets you run applications without having to work from your car. Follow these installation steps to use it.
Android Auto is also available on mobile devices which gives users access to Android Auto capabilities without needing to connect it to a compatible vehicle. The phone device can work in the same way an Android Auto device does. The users can still use voice to handle calls, messages, music, and navigation using an interface designed for driving. Unfortunately, Android Auto apps are still not available for many countries (including Poland). Visit this site to find out where it's available.
If you already have experience with developing for Android, you should not find building Auto apps to be too difficult. Just remember a few important things which we underlined in all articles and adjust your app, paying particular attention to UI differences. Be aware that the purpose of an Auto application is different than if it were meant for a phone device. So - prepare your layouts with
If you are going to build an app for Android Auto, you need to meet all the requirements and restrictions which Google imposes. Auto app development is very different than developing for tablets, TV or Wear. It is still in its early stages and its functionalities are limited. Remember that the user should focus more on the road and less on their smartphone!
|Android TV||Android Wear||Android Auto|
(+) One codebase for phone and TV.
(+) Transparent guidelines and documentation.
(+) Provides a specific library with TV components and a clear approach to building applications.
(+) Keep UI simple.
(+) Same project structure.
(+) Easy setup.
(+) One project for wearable and phone app.
(+) Separate modules.
(+) New style guidelines that make your app simple and transparent.
(+) Same project structure.
(+) Easy setup.
(-) Completely new style guidelines and requirements for
(-) Be aware that some features are not available for Android TV.
(-) Communication between dependent apps might be difficult.
(-) Small device screen, remember to keep views simple.
(-) Swipe-to-dismiss might not work well in more complex UIs.
(-) Android Auto app is not available in Poland, so testing your app might be difficult.
(-) Android Auto is in its early stages.
(-) Limited functionality (audio, messaging).
(-) The huge amount of restrictions.
(-) Expensive device :D