Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Things Projects

You're reading from   Android Things Projects Efficiently build IoT projects with Android Things

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher Packt
ISBN-13 9781787289246
Length 232 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Francesco Azzola Francesco Azzola
Author Profile Icon Francesco Azzola
Francesco Azzola
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Getting Started with Android Things 2. Creating an Alarm System Using Android Things FREE CHAPTER 3. How to Make an Environmental Monitoring System 4. Integrate Android Things with IoT Cloud Platforms 5. Create a Smart System to Control Ambient Light 6. Remote Weather Station 7. Build a Spying Eye 8. Android with Android Things

How to develop an Android app that retrieves data from Android Things


In this section, we will cover another integration scenario where an Android app retrieves data from Android Things. While in the previous scenario we used the Android app to control Android Things, here, in this context, we want to retrieve information from sensors connected to the Android Things board. To demonstrate how to do this, we will reuse the project we developed in Chapter 6, Remote Weather Station. To retrieve the data, we have several options, but we are interested in these two following strategies:

  1. Using the MQTT protocol.
  2. Connecting the Android app to Android Things using Bluetooth.

In the first option, in order to retrieve data from sensors, we could implement an Android app that uses MQTT through the Android Things app. As you will remember, in the Remote Weather station project we used MQTT to connect several boards and applications. In this context, we simply have to implement an Android MQTT subscriber...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime