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
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface

Chapter 2. Creating an Alarm System Using Android Things

In this chapter, we will build an alarm system using Android Things. The target of this project is creating a system that detects movements using PIR sensors and when this event happens the Android Things app will send a notification to the user smartphone. The principles of this project are commonly used in real alarm systems we have in our homes, but we will build it with a totally new operating system. This is an interesting project because it uses, at the same time, sensors and cloud platforms. Through this project, we will explore how to use GPIO pins in Android Things and how to interact with two states sensors.

The main topics covered in this chapter are:

  • How to use build an alarm system
  • How to use GPIO pins and PIR sensors
  • How to handle events from a GPIO pin
  • How to build an app that is independent of the board
  • How to notify events from Android Things to Android smartphones

This project demonstrates how powerful Android Things SDK...