Book Image

Android Things Projects

By : Francesco Azzola
Book Image

Android Things Projects

By: Francesco Azzola

Overview of this book

Android Things makes developing connected embedded devices easy by providing the same Android development tools, best-in-class Android framework, and Google APIs that make developers successful on mobile. With this book, you will be able to take advantage of the new Android framework APIs to securely build projects using low-level components such as sensors, resistors, capacitors, and display controllers. This book will teach you all you need to know about working with Android Things through practical projects based on home automation, robotics, IoT, and so on. We’ll teach you to make the most of the Android Things and build enticing projects such as a smart greenhouse that controls the climate and environment automatically. You’ll also create an alarm system, integrate Android Things with IoT cloud platforms, and more. By the end of this book, you will know everything about Android Things, and you’ll have built some very cool projects using the latest technology that is driving the adoption of IoT. You will also have primed your mindset so that you can use your knowledge for profitable, practical projects.
Table of Contents (15 chapters)
Title Page
About the Author
About the Reviewers
Customer Feedback

Android companion app

In order to receive the notifications, we have to install an Android companion app on our smartphone. Just to simplify the system, this Android app will:

  1. Subscribe to the channel used by the Android Things app to send notifications.
  2. Implement a service to listen to the incoming notification.
  3. Show the notification to the user.

If you do not know how to receive notifications in Android you can visit to know more. The source code of the Android companion app is provided with this book's source code. The app interface is very simple because we simply have to subscribe to the topic and wait for the incoming notifications.

To install the app, just open the project using Android Studio and connect your smartphone to your PC/Mac. Add the google-services.json file to your app module. This file is the same one that you downloaded in the previous steps. Run and install the app on your smartphone. That's all.

The following screenshot shows...