Reader small image

You're reading from  Android Things Projects

Product typeBook
Published inJun 2017
Reading LevelBeginner
PublisherPackt
ISBN-139781787289246
Edition1st Edition
Languages
Right arrow
Author (1)
Francesco Azzola
Francesco Azzola
author image
Francesco Azzola

Francesco Azzola is an electronic engineer with over 15 years of experience in computer programming and JEE architecture. He is SCEA certified (Sun Certified Enterprise Architect), SCWCD, and SCJP. He is an Android and IoT enthusiast. He loves creating IoT projects using Arduino, Raspberry Pi, Android, and other platforms. He is interested in the convergence between IoT and mobile applications. Previously, he worked in the mobile development field for several years. He has created a blog called survivingwithandroid,where he shares posts about coding in Android and IoT projects.
Read more about Francesco Azzola

Right arrow

How to implement the notification system


Now we are ready to implement the last part of this project: the notification system. In the next paragraphs, we will describe how to send a notification to the user smartphone when motion is detected. As the messaging system, this IoT project uses Google Firebase. This is a cloud platform developed by Google providing several interesting services. We will use the Notification service.

There are several ways we can send a notification from the Android Things app to a user smartphone. To keep things simple, we will use topic. You can imagine a topic like a channel. After a device subscribes to a topic, it will receive all the messages published to this channel. In our project, the user smartphone behaves like a subscriber receiving messages from the channel, while the Android Things app behaves like a publisher publishing the messages.

Now it is clear the roles these two apps play in this project.

Before implementing it, we have to configure the Firebase...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Android Things Projects
Published in: Jun 2017Publisher: PacktISBN-13: 9781787289246

Author (1)

author image
Francesco Azzola

Francesco Azzola is an electronic engineer with over 15 years of experience in computer programming and JEE architecture. He is SCEA certified (Sun Certified Enterprise Architect), SCWCD, and SCJP. He is an Android and IoT enthusiast. He loves creating IoT projects using Arduino, Raspberry Pi, Android, and other platforms. He is interested in the convergence between IoT and mobile applications. Previously, he worked in the mobile development field for several years. He has created a blog called survivingwithandroid,where he shares posts about coding in Android and IoT projects.
Read more about Francesco Azzola