Android Things 1.0 introduces a variety of new features and capabilities for users and developers. This document highlights what's new for developers.
Home Activity Support
Android Things expects one app to expose one "home activity" in its manifest as the main entry point for the system to automatically launch on boot. This activity must contain an intent filter that includes both CATEGORY_DEFAULT and CATEGORY_HOME.
For ease of development, this same activity should include a CATEGORY_LAUNCHER intent filter so Android Studio can launch it as the default activity when deploying or debugging.
<application android:label="@string/app_name"> <activity android:name=".HomeActivity"> <!-- Launch activity as default from Android Studio --> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <!-- Launch activity automatically on boot, and re-launch if the app terminates. --> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.HOME"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> </application>
Android Things 1.0 allows apps to control and monitor the process of applying over-the-air (OTA) software updates from the Android Things Console. Use UpdateManager to set the update policy and configure the reboot behavior of the device following an OTA update. You can manually trigger device reboot or factory reset with DeviceManager.
During development and testing, you can subscribe your test devices to different
channels, such as
beta, and deliver separate OTA build to those
devices through the Android Things Console. Use
to change the channel for a given device.
For more details, see the device updates guide.
Android Things 1.0 enchances the core Android Bluetooth APIs with additional features for device state management. Configure active Bluetooth profiles with BluetoothProfileManager and set the device attributes and capabilities with BluetoothConfigManager. Use the BluetoothConnectionManager to initiate pairing with a remote device, handle incoming pairing requests, and control the connection process.
See the Bluetooth API guide for more details.
Connect your devices to IP-based Low-Power Wireless Personal Area Networks (LoWPAN) in Android Things 1.0, including Thread networks. Use the LowpanManager to discover the supported radio interfaces on the device and listen for changes in state. Create new networks and join existing networks through the LowpanInterface, or create a LowpanScanner to discover other networks nearby.
See the LoWPAN guide for more on setting up these networks and getting started with OpenThread supported hardware.
The Peripheral I/O APIs allow your apps to communicate with sensors and actuators using industry standard protocols and interfaces. The following interfaces are supported: GPIO, PWM, I2C, SPI, UART. Open a connection to any of these interfaces with the or list the available ports using the PeripheralManager.
Android Things 1.0 enables apps to extend existing Android framework services and inject hardware events with user-space drivers. In this release, drivers are supported for the following categories: location, input, sensors, LoWPAN. Implement driver code using Peripheral I/O to communicate with your custom hardware, then bind that driver to the framework through the UserDriverManager.
Adjust the date/time settings of the device in Android Things 1.0 with the TimeManager. This includes control of the clock time and time zone, as well date/time formats and automatic time syncing with the network.