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 Quick Start Guide

You're reading from   Android Things Quick Start Guide Build your own smart devices using the Android Things platform

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789341799
Length 192 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Raul Portales Raul Portales
Author Profile Icon Raul Portales
Raul Portales
Arrow right icon
View More author details
Toc

Companion apps and communication

One of the most typical setups for IoT involves two apps: one for the thing and another one for mobile. It just makes sense to control your IoT device from your phone. With Android Things and Android Studio we can create both apps under the same project, each one being its own module. This setup also allows us to have another common library module that is used by both including areas such as a communication data model.

With Android Studio, we can have a mobile app and a Things app as modules of the same project

The big question about having a companion app is about how it should communicate with the IoT device. There are multiple ways to do so. The following three are the most common:

  • Hosting a REST API server on the things app and a client on the mobile one
  • Firebase Realtime Database integration on both sides
  • Nearby communication

Each option...

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 $19.99/month. Cancel anytime