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

The fingerprint sensor


Samsung was the first to introduce the fingerprint sensor in their Android devices, and they also provided support for it in their Pass SDK. The official support for fingerprint sensors was provided in the Android platform from Android 6.0 (API Level 23). The fingerprint sensor is a hardware sensor; generally it is found either at the back of the Android phone, or at the bottom of the screen. Typically, two types of fingerprint sensor are found today: the first one is a capacitive sensor, and the second one is an optical sensor. An optical sensor works by shining a bright light over your fingerprint and taking a digital photograph. This digital image is compared with the original fingerprint digital image to get the authentication results. The capacitive sensor is found in most iPhones and Android phones today. It works by passing a mild electric current through the outer skin of your finger. When your finger is placed on the surface of the sensor, the ridges in your...