Android Things - Google's bet on IoT
We check the potential of Android Things with Raspberry Pi and Thingtia
Android Things is an Android-based embedded operating system platform by Google. It is aimed to be used with low-power and memory constrained Internet of Things (IoT) devices. Android Things offer some of Android mobile capabilities including Android application development. Developers are able to use familiar Android SDKs, APIs and services including the Google Cloud Platform.
We have implemented an application that will count the number of faces and report that to Thingtia. This application has been distributed on a Raspberry Pi 3 Model B with camera module and Android Things OS. The app have been implemented with 2 modules within same application. One module will integrate camera module and detect number of face in the photo. Second module uses REST API to send sensor data to Thingtia. With this PoC we will be capable to test main capabilities of Android Things like:
- Installation of Android Things OS in Raspberry Pi.
- Android Things Console allow us to create product through which we can manage app version, distribution, OS and app updates.
- Firebase will manage push messaging and device status management.
- Full customization of OS Including booting logo and user interface.
- Environment development with configurations and limitations.
- Integration with third party API like Thingtia Cloud Integration with external Raspberry Pi devices like Camera Module.
Google is providing a a trusted platform to develop on with standard updates and fixes from Google and simplify the hardware integration:
- SoMs integrate the SoC (System-on-chip), RAM, flash storage, WiFi, Bluetooth and other components onto a single board and come with all of the necessary FCC certifications.
- The Board Support Package (BSP) is managed by Google, so that means we don't have to do kernel or firmware development.
We have integrated camera module using which we will take photo and detect number of faces in that photo. The Android Things OS does not comes with camera app. So to show preview or capture image we need to implement our own version of camera and start showing preview.
We have used FCM to push data to the app. Once app get push it will send a broadcast and capture image using camera.
We have integrated Thingtia with our app. For the time being we use camera as as sensor which detect number of people and update to Thingtia. From the camera we will take picture and detect number of faces.
The developed app can update number of faces detected to Thingtia sensor. The app can do this by simple REST API call to Thingtia. Once this is done we can view the result (the number of faces) from Thingtia web.
This is the first stable release version of Android Things. We detected that the architecture of Android Things is similar to Android mobile app. The main difference in OS architecture is that we have only subset of java API. But we do have extra things: support library and Google service for Android Things OS. In Android things app development we can use same architecture and design patterns and that is providing many interesting capabilities related with MDM and App Development.
We observe certain limitations in the current version. Android Things OS only supports few IoT devices. These boards use a mixture of Intel and ARM based CPUs, and both 32-bits and 64-bits are supported. The minimum amount of RAM is 512MB.
The installation in a Raspberry Pi 3 Model B is very simple. With few steps you have your Raspberry Pi ready to work with wifi connection. Additionally the Android Things SOM architecture let us to integrate standard modules like camera and other sensors easily. There is no need to write hardware drivers. Android Things provides us Java API which is helpful to implement our business logic.
Development with Android things is similar to Android native mobile development: development of apps for our devices with existing Android development tools, APIs, and resources along with new APIs that provide low level I/O and libraries for common components. Google provides the system image, updates, and fixes so that we can focus on creating compelling products. We can push system updates and our own app updates to devices using different channels. These channels help us to easily manage our app testing process.