Fingerprint Authentication using BiometricPrompt


Fingerprint Authentication using BiometricPrompt

In this blog, we are going to learn about Fingerprint Authentication using BiometricPrompt.The Android Framework and Security team recently released the AndroidX Biometric Library, a support library that supersedes all previous iterations of the API.

The library makes all the features announced in Android 10 (API level 29) available all the way back to Android 6 (API level 23).

BiometricPropt UI : 

BiometricPropt provides there own stable UI and Dialogs. In the previous FingurePrint Manager, there is no option of the UI. There is only a custom view.

Android app integration :

Integrate this dependency to the build.gradle (app) file.

Check whether your device supports any biometric authentication. :

Firstly, You should create and biometricManager object.

Create an instance of BiometricPrompt:

In this paragraph, We are going to create a BiometricPropt object. Firstly, You should instantiate BiometricPrompt early in your Activity/Fragment lifecycle, preferably inside onCreate() or onCreateView(). This is a key difference between FingerprintManager and BiometricPrompt. It was OK to instantiate FingerprintManager just in time to call authenticate(). But for BiometricPrompt to send callbacks to the proper activity, say in case of configuration changes, you must instantiate it a bit before you need to call authenticate().

Create PrompInfo object to show the biometric prompt dialog :

Now you just need to call to authenticate method of biometriPrompt :

Fingerprint Authentication using BiometricPrompt :

Here we achieve this,


. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


Webkul is a truly trusted and supported IT Company to develop business ideas for e-commerce. They provide professional support after deploying the solution to production and be responsible to act for fixing the reported issues or system errors. We highly encourage to deal with Webkul for business development.

Hussein Zawia

Hussein Zawia

Co-founder, 24Dokan

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home