BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Android Auto Now Supports IoT Apps Running in Cars

Android Auto Now Supports IoT Apps Running in Cars

Android IoT apps enable running internet of things (IoT) apps in cars powered by Android Auto and Android Automotive. This will open up the possibility of controlling IoT devices like home security, lights, doors, and more, directly from within a car.

Cars using Android Auto will allow their drivers to download IoT apps from the Google Play store. IoT apps can be developed using the Android for Cars App Library, which provides a set of classes specifically designed for car apps. Additionally, the library includes app templates aimed to make it easier for developers to meet Google's requirements in terms of driver distraction and compatibility with the variety of car screen factors and input modalities that can be found in cars.

To support IoT apps, the Android for Cars App Library adds a new IOT category to be used in the app manifest file. In addition to IOT, the library also supports the NAVIGATIONcategory, for turn-by-turn navigation apps, and the POI (point of interest) category, for apps helping to find points of interest such as parking spots, charging stations, and gas stations. An app may belong to more than one category.

The three main abstractions provided by the Android for Cars App Library are Screen, CarAppService, and Session. A Screen object is responsible to present the user the app UI and can coexist with other Screen objects in a stack. A CarAppService is an interface that the app must implement to be discovered by the host system. It also provides Session instances for each connection to serve as an entry point to display information on the car screen by controlling whether the app is hidden or not, paused, stopped, etc.

While developing an Android for Cars, IoT app is not dissimilar from creating a navigation or POI app; Google provides specific guidelines developers should comply with for IoT apps.

In particular, they define new criteria as to what kind of distractions are allowed. So, while it is ok if an IoT app notifies the driver about an event taking place in their home, all tasks related to app setup or configuration, as well as fine-grained device control, are not allowed. Likewise, IoT apps must support simple, one-touch features to control on and off features, such as turning lights on and oof, opening and closing a door, etc.

About the Author

Rate this Article

Adoption
Style

BT