Biometric Authentication in Android

Are you trying to create an Android Application which includes bio-metric authentications? If yes, this article will help you.

In this article, I will explain you how to implement biometric authentications with Biometric Authentication library. Biometric Authentication is an Open-Source Android Library which is developed by my self and that library supports for Java and Kotlin based android projects for biometric implementations such as fingerprint authentications, faceID, Iris etc…

Repository — https://github.com/Sumudu-Sahan/BiometricAuthentication

Implementation with Biometric Authentication library

  1. Create and Android Application
  2. Add the JitPack repository to your project level build.gradle file

3. Add the dependency to your app level build.gradle file

This library packs with SDP, SSP libraries, androidx bio-metric library, vibrator, bio-metric related permissions. Therefore no need to add below mentioned permissions again and libraries.

Below permissions are already included inside the library

Below dependencies are already included inside the library

4. Sync the project

Start Authentication

This library supports Face ID, Fingerprint, Iris scanner with BiometricPrompt and for older versions than Android Pie, supports with custom fingerprint authentications.

When the application start the biometric authentication, for older android versions (Below Android Pie) will prompt a dialog with authenticator.

For new android OS versions (Android Pie or above), app will prompt the biometricprompt dialog to authenticate.

Authentication Failing Reasons

Below are the reasons when the biometric authentication has failed.

For more information, Please refer the wiki in repository.

That’s it!!!

Congratulations on setting up your Android application with Biometric Authentication Library and I hope you found the article helpful with getting you ready to use the Biometric Authentication Library. Happy coding!

Software Engineer @ WSO2 | WSO2 Certified API Manager Expert | BIT(UCSC) | DiHN | OCPJP | Student Member of CSSL

Software Engineer @ WSO2 | WSO2 Certified API Manager Expert | BIT(UCSC) | DiHN | OCPJP | Student Member of CSSL