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

Chapter 7. The Google Fit Platform and APIs – The Fitness Tracker App

This chapter will introduce you to new ways of working with sensors. We will learn about the new Google Fit platform and how it can be used to manage fitness sensor data efficiently. We will explore the different APIs provided by the Google Fit platform. In this chapter, we will learn new concepts, such as how we can request the automated collection and storage of sensor data in a battery-efficient manner, without your app being in the background all the time. We will also learn how to get data from a remotely connected device, such as Android Wear. In this chapter, we will mostly deal with fitness sensors and as a learning exercise, we will develop a fitness tracker application that will collect and process your fitness data.

The topics you will learn about in this chapter are:

  • What is the Google Fit platform?
  • How the Android fitness APIs, Rest APIs and Google Fitness Store fit together into the Google Fit platform
  • The details...