Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Sensor Programming By Example

You're reading from   Android Sensor Programming By Example Take your Android applications to the next level of interactivity by exploring the wide variety of Android sensors

Arrow left icon
Product type Paperback
Published in Apr 2016
Publisher Packt
ISBN-13 9781785285509
Length 194 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Varun Nagpal Varun Nagpal
Author Profile Icon Varun Nagpal
Varun Nagpal
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Sensor Fundamentals FREE CHAPTER 2. Playing with Sensors 3. The Environmental Sensors – The Weather Utility App 4. The Light and Proximity Sensors 5. The Motion, Position, and Fingerprint Sensors 6. The Step Counter and Detector Sensors – The Pedometer App 7. The Google Fit Platform and APIs – The Fitness Tracker App

Time for action – using the fingerprint sensor


In order to support the fingerprint sensor, the Android platform has introduced a new system service, which is called the Finger Print Service, and it can be accessed using the instance of FingerprintManager. It provides all the necessary APIs to use the fingerprint sensor. In the following example, we will use the fingerprint sensor to authenticate the user. In order to make this example work, the Android device should have a fingerprint sensor, and it also should have set up or enrolled the user's fingerprint using the security settings. We also need to use two components of security (Keystore and Cipher) to use the fingerprint authentication API. Fingerprint sensor APIs require install time permission in the AndroidManifest.xml file (android.permission.USE_FINGERPRINT) and also runtime permission before using them. Now, let's look at the implementation details:

  1. Inside the onCreate() method of FingerPrintActivity, we initiated the object of...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image