Android Things Developer Preview 2

Posted by Wayne
, Developer Advocate for IoT

Today we are releasing Developer Preview 2 (DP2) for Android Things, bringing
new features and bug fixes to the platform. We are committed to providing
regular updates to developers, and aim to have new preview releases
approximately every 6-8 weeks. Android Things is a comprehensive solution to
building Internet of Things (IoT) products with the power of Android. Now any
Android developer can quickly build a smart device using Android APIs and Google
services, while staying highly secure with updates direct from Google. It
includes familiar tools such as Android Studio, the Android Software Development
Kit (SDK), Google Play Services, and Google Cloud Platform. Android Things
supports a System-on-Module (SoM) architecture, where a core computing module
can be initially used with development boards and then easily scaled to large
production runs with custom designs, while continuing to use the same Board
Support Package (BSP) from Google.

New features and bug fixes

Thanks to great developer feedback from our Developer Preview 1, we have now
added support for USB Audio to the Hardware Abstraction Layer (HAL) for Intel
Edison and Raspberry Pi 3. NXP Pico already contains direct support for audio on
device. We have also resolved many bugs related to Peripheral I/O (PIO). Other
feature requests such as Bluetooth support are known issues, and the team is
actively working to fix these. We have added support for the Intel Joule platform, which offers the most
computing power in our lineup to date.

Native I/O and user drivers

There are many developers who use native C or C++ code to develop IoT software,
and Android Things supports the standard Android NDK. We have now released a
library to provide native access to the Peripheral
(PIO), so developers can easily use their existing native code. The documentation
explains the new API, and the sample provides a
demonstration of how to use it.

An important new feature that was made available with Android Things DP1 was
support for user
. Developers can create a user driver in their APK, and then bind it
to the framework. For example, your driver code could read a GPIO pin and
trigger a regular Android KeyEvent, or read in an external GPS via a serial port
and feed this into the Android location APIs. This allows any application to
inject hardware events into the framework, without customizing the Linux kernel
or HAL. We maintain a repository
of user drivers for a variety of common hardware interfaces such as sensors,
buttons, and displays. Developers are also able to create their own drivers and
share them with the community.

TensorFlow for Android Things

One of the most interesting features of Android Things is the ability to easily
deploy machine learning and computer vision. We have created a highly requested
that shows how to use TensorFlow on
Android Things devices. This sample demonstrates accessing the camera,
performing object recognition and image classification, and speaking out the
results using text-to-speech (TTS). An early-access TensorFlow inference library
prebuilt for ARM and x86 is provided for you to easily add TensorFlow to any
Android app with just a single line in your build.gradle file.

TensorFlow sample
identifying a dog's breed (American Staffordshire terrier) 

on a Raspberry Pi 3
with camera


Thank you to all the developers who submitted feedback for the previous
developer preview. Please continue to send us your feedback by filing bug
and feature
, and ask any questions on stackoverflow.
To download images for Developer Preview 2, visit the Android Things download
page, and find the changes in the release
. You can also join Google's IoT
Developers Community
on Google+, a great resource to keep up to date and
discuss ideas, with over 2900 new members.

Related Posts

Subscribe Our Newsletter