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:
Inside the
onCreate()
method ofFingerPrintActivity
, we initiated the object of...