One week with Android Auto.
These are my thoughts about Udacity course Android Auto Development and after the first contact with Android Auto technology.
There are two interesting facts. We spend a lot of time in the car. It is said it is on average about one hour a day in the US but I am sure that in EU is the same or even longer. We check our smartphones an average 125 times a day. It’s hard to admit but we do it in the car too.This is not wise and it can cause dangerous situations on the road. Getting a mandate is the smallest problem you can make. Android Auto allows us to remain connected but in a secure way, integrated with our car.
Android allows me to create application on many different devices. The fact that I do not have to worry about the brand of the smartphone is really cool. It is also very easy to create a tablet-optimized version too. However creating an application that will be displayed in the car sounds really fascinating, isn’t?
There are always the same questions at the beginning with new technology. Where to start? Where to find reliable information? Where to find information presented in easy to assimilate form? I started my adventure with Android Auto from Udacity course: Android Auto Development.
Using Android Auto is easy from a user perspective. Just download the Google Play apps that support Android Auto and connect your phone to car. It goes into car mode and the screen of your car shows your applications. I was really curious how it looks from development point of view and is it very different from developing applications on smartphones.
There are two topics covered in the Android Auto Development course. First one is Android Auto Messaging and second one is Android Auto Media.
Android Auto Messaging
BasicNotifications from Android samples is staring point for building Auto Messaging. There are only a few steps required to implement this functionality:
- Create automotive application name and define it in AndroidManifest.xml
- Add two broadcast receivers for handling that notification was heard and replied
- … and appropriate intent filters
- Use PendingIntent for read and reply action
- Add UnreadConversation that represents an unread or new portion of a conversation as a list of messages
- Use CarExtender to add Android Auto extensions to notifications
There is not dedicated Virtual Device for Android Auto but it is easy to use smartphone simulator and install Android Auto Messaging Simulator on it.
A Media Playback App for Android Auto
Another important feature in Android Auto is playing audio. Car screen uses its own user interface so minimum application shown in course has not interface at all. This time it does not base on Android Sample source code so you can check my GitHub repository to grab the starting code.
Contribute to MinimalAutoMedia development by creating an account on GitHub.github.com
The Android Audio Framework is general Android topic. Android Auto is extension of media application created on mobile or tablet so you can add it to any existing app. It shows Universal Music Player which is fully valued smartphone application.
Similar to messaging we have Android Auto Media Browser Simulator.
Android Auto does not require the creation of special applications but an extension already existing. It is relatively easy to implement. You get additional platform for your application and a new experience for your users. You do not have to worry about the user interface. Android Auto has its own which is optimized for drivers.