what is android things?
android things is the new os developed by google for iot. if we look at the past, google made another attempt to jump into iot ecosystem with brillo that was not largely successful. even if android things is still in the developer preview version, it introduces some important features that make it different from brillo. android things supports only three
raspberry pi 3
the list, by now, is quite limited but the os is still in the preview version so more devices will be added in the future.
android things is a modified version of android and it has a subset of the android api. this aspect is very important because android developers can move to android things smoothly. they use the android development experience. of course, the apis related to maps authentication are not supported.
the overall development process used for android apps is still valid for android things, even the ide is the same. all these aspects will have a great positive impact on this os future. it is the first os that uses java as development language (as android), while others os or iot boards are based on c/c++. moreover, developers can reuse
google cloud platform components like firebase
in the development process.
getting started with android thigs, the new iot os.
how to install android things
now we know what is android internet of things known as android things we can start installing it. in this article, we will use raspberry pi 3 as a development board. what do we need?
this is the list of things we need to get started with android things os:
raspberry pi 3
micro sd card 8 gb or more
windows or os x
at the beginning, it is necessary to format the sd card using fat 32. if you are using a mac, go to disk utility and format the card:
all done. you are ready to install the
developer preview image
. download the image for raspberry. once the download is ready, we can install it:
sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskn
one important step is to identify the
disk number (n)
. you can do it using os x information and looking for the card reader device:
is the number we are looking for. in this case, n=1. during the installation process, you don’t have messages and you have simply to wait until the process is complete. at the end, you get a message saying that the disk is unreadable, it is ok, it works!
it is time to insert the new os disk into your raspberry pi.
verify android things installation
finally, we can verify if the installation is correct powering on the raspberry pi. you can use a usb cable connected to your pc to start raspberry. at the beginning, you need to connect raspberry to the lan using a cable and you need an hdmi cable to connect the board to a tv or monitor. if you don’t want to use an hdmi cable you can use vysor a chrome plugin.
when the boot process finishes, the result is shown below:
if you get this screenshot it means that
android internet of things
is running on the raspberry pi 3.
now, it is possible to connect to the android things using
as we do in android. moreover, it is possible to get the device list using adb devices:
that’s all. android things is up and running. now, you can start developing your first iot project as we will see in the next article.
new api in android internet of things
even if android things is a subset of android, this new os introduces some important apis that are specific to the iot domain. when we create an
, we have to communicate with external sensors or actuators. thus, android things uses two industry standards in
gpio for sensors
pwm for dc motors, lights, etc.
moreover, some content providers (calendar, telephony, etc.) are not supported.
an interesting aspect is that android things supports ui interface like a “normal” android app.
after a few days, i can say that android things is an interesting iot os based on android. this is very important because the development process is the same used for an android app. developers can reuse the android knowledge and experience. in this way, the transition is smooth. of course, android things is still a developer preview so many things could change but the beginning is very promising.