Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 220.127.116.11 release ready!
Owner and Founder. Opencart
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 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.
Integrate this dependency to the build.gradle (app) file.
Firstly, You should create and biometricManager object.
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().
BiometricPrompt.PromptInfo is a required parameter for authenticating with the BiometricPrompt API. It supplies important instructions to the prompt, such as whether explicit user confirmation is required (note: explicit confirmation is the default behavior, and should always be applied if the API is being used for payments or transactions — for use with app or account sign-in, the explicit confirmation can be set to false to enable a more streamlined experience). BiometricPrompt.PromptInfo also allows your app to provide additional context for the ongoing transaction by setting a title, subtitle, and other descriptive text to appear on the prompt.
Your BiometricPrompt.PromptInfo might look like this:
Here we achieve this,
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
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.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.