The Fingerprint authentication API
Android Marshmallow now allows us, the developers, to authenticate users with their fingerprint scans when using such authentication scanners on supported devices.
The Fingerprint
API was added to Android Marshmallow via a whole new package:
android.hardware.fingerprint
The package contains four classes:
FingerprintManager
FingerprintManager.AuthenticationCallback
FingerprintManager.AuthenticationResult
FingerprintManager.CryptoObject
Each class has a specific role in our fingerprint authentication process.
How do we use fingerprint authentication?
The preceding four classes of the android.hardware.fingerprint
package can be explained in the following manner:
FingerprintManager
: Manage access to fingerprint hardwareFingerprintManager.AuthenticationCallback
: Callback used in theauth
processFingerprintManager.AuthenticationResult
: Result container forauth
processFingerprintManager.CryptoObject
: SpecificCrypto
object to use withFingerprintManager
Say...