Developer Advocate for IoT
The next release of Android Things Developer Preview 6 (DP6) is here with lots
of new features and bug fixes. Android Things is Google's platform that enables
Android Developers to create Internet of Things (IoT) devices with support for
powerful applications such as video and audio processing and on-board machine
learning with TensorFlow. For the specifics on what is new, visit the href="https://developer.android.com/things/preview/releases.html">release
notes. Here are a few of the highlights of what is in DP6.
IoT launcher
DP6 includes a new IoT launcher that allows the user to see the current state of
the device and change settings using a touch screen or USB input devices.
Settings such as configuring the WiFi, finding the build ID, and checking for
updates is now something that can be done interactively, making it even easier
to get started. This launcher is visible when no other developer-provided href="https://developer.android.com/things/sdk/index.html#home_activity_support">IOT_LAUNCHER
Activity is present.
Graphics acceleration defaults
Android Things uses the open-source href="https://github.com/google/swiftshader">SwiftShader library, a
CPU-based implementation of the OpenGL ES APIs. This enables common OpenGL
support across all platforms, even those with no GPU hardware. However, many
simple 2D UIs render faster if the drawing is done directly to the framebuffer
and OpenGL emulation is not used. In DP6, OpenGL rendering is disabled by
default to ensure that most apps run with the fastest UI possible. If you need
OpenGL support for 3D rendering, WebView, or TextureView, then explicitly enable
it in your AndroidManifest.xml according to the href="https://developer.android.com/guide/topics/graphics/hardware-accel.html">documentation:
<activity
...
android:hardwareAccelerated="true">
API 27 and Google Play Services
DP6 is now based on the latest Android 8.1 developer preview, with API level 27.
Most of the standard Android samples now work on DP6. For example, the href="https://github.com/googlesamples/android-Camera2Basic">Camera2Basic
sample using the Camera2 API and TextureView now works on both NXP and Raspberry
Pi based devices (with the hardwareAccelerated flag set to true). Google Play
Services has been updated to support SDK version 11.6, supporting all the href="https://developers.google.com/android/guides/releases">latest
features.
Command-line flashing tool
We heard from developers that flashing and configuring a board using fastboot
can be tedious, so the href="https://partner.android.com/things/console/#/tools">Android Things
Console now brings a new and simpler way of flashing device images. Instead
of using fastboot and adb commands manually, a new interactive command-linehref="https://partner.android.com/things/console/#/tools">android-things-setup-utility
is now provided. This tool makes it much easier to get started with Android
Things, and automates the download and flashing process.
Android Things Console updates
DP6 introduces the new partition scheme that will be used for the upcoming
production release. Due to the new partition layout, the over-the-air update
(OTA) system cannot update existing DP5.1 or earlier devices. Developers will
need to go to the Android
Things Console, and download and flash a new DP6 build. The Console UI has
also been changed for DP6 features, and will only allow you to create new builds
based on DP6. If you have any older existing builds, they are still available
for download but will not support OTA updates. Developers are encouraged to move
all work to DP6.
GPIO pin naming
The interactive IoT launcher shown at boot now includes an I/O pinout section
where you can discover the labels of all the pins. The pin naming used by the
i.MX7 has been changed, and you should update your code to use this new naming
convention. See the href="https://developer.android.com/things/hardware/imx7d-pico-io.html">i.MX7
documentation for the complete list of pin names.
Settings and Device Update APIs
New APIs have been added to Android Things that control the href="https://developer.android.com/things/sdk/apis/settings.html">configuration
of the local device and device href="https://developer.android.com/things/sdk/apis/update.html">updates. href="https://developer.android.com/things/reference/com/google/android/things/update/UpdateManager.html">UpdateManager
gives developers control over when updates and reboots can be performed,
ensuring the device is available for the user when needed. href="https://developer.android.com/things/reference/com/google/android/things/device/DeviceManager.html">DeviceManager
controls factory reset, reboot, and device locales. APIs are also provided for
settings such as href="https://developer.android.com/things/reference/com/google/android/things/device/ScreenManager.html">ScreenManager
to control the screen, and href="https://developer.android.com/things/reference/com/google/android/things/device/TimeManager.html">TimeManager
to control the clock and time zone.
Peripheral command-line tool
We now provide a command-line tool href="https://developer.android.com/things/sdk/pio/pio-cli.html">pio
that gives developers access to the Peripheral API via the adb shell. Developers
can interactively test GPIO, PWM, UART, I2C, SPI, and future interfaces from an
adb shell, which is useful for debugging and automated testing.
Feedback
DP6 includes significant changes and improvements to the platform. Please send
us your feedback by filing href="https://code.google.com/p/android/issues/entry?template=Android%20Things%20bug%20report">bug
reports and href="https://code.google.com/p/android/issues/entry?template=Android%20Things%20feature%20request">feature
requests, as well as asking any questions on href="http://stackoverflow.com/questions/tagged/android-things">Stack
Overflow. To start using DP6, use the href="https://partner.android.com/things/console">Android Things Console to
download system images and flash existing devices, or use the href="https://partner.android.com/things/console/#/tools">android-things-setup-utility
.
More information about the changes are available in the href="https://developer.android.com/things/preview/releases.html">release
notes. You can also join Google's IoT
Developers Community on Google+, a great resource to get updates and discuss
ideas. Also, we have our new hackster.io
community, where everyone can share the amazing projects they have built. We
look forward to seeing what you build with Android Things!
1 comments: