Book Image

Android Sensor Programming By Example

By : Varun Nagpal
Book Image

Android Sensor Programming By Example

By: Varun Nagpal

Overview of this book

Android phones available in today’s market have a wide variety of powerful and highly precise sensors. Interesting applications can be built with them such as a local weather app using weather sensors, analyzing risky driving behavior using motion sensors, a fitness tracker using step-counter sensors, and so on. Sensors in external devices such as Android Watch, Body Analyzer & Weight Machine, Running Speed Cell, and so on can also be connected and used from your Android app running on your phone. Moving further, this book will provide the skills required to use sensors in your Android applications. It will walk you through all the fundamentals of sensors and will provide a thorough understanding of the Android Sensor Framework. You will also get to learn how to write code for the supportive infrastructure such as background services, scheduled and long running background threads, and databases for saving sensor data. Additionally, you will learn how to connect and use sensors in external devices from your Android app using the Google Fit platform. By the end of the book, you will be well versed in the use of Android sensors and programming to build interactive applications.
Table of Contents (13 chapters)
Android Sensor Programming By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Summary


In this chapter, we learned new ways of working with fitness sensors using the Google Fit platform. The Google Fit platform simplifies the whole process of sensor data collection, storage, and retrieval by taking on most of the responsibility itself. The application has to do the minimal work of requesting and querying the fitness data. The Google Fit platform has been developed to deal only with fitness sensor data. It doesn't deal with other sensor data. The Google Fit platform also does a great job of maintaining and syncing all your fitness data on multiple devices, so if you use Android Wear and an Android phone, then both of them track your step counts differently, but at the end of the day you will find that the step count data is the same on both of them.

In the next bonus chapter, we will explore sensors-based APIs and their use in real-world applications. We will also discuss new examples of combining two or more sensors' data together, which is commonly referred to as sensor...