Learn how to use Biometric (FaceRecognition or FingerPrint) for Authentication

For a detailed explanation see this youtube video: https://www.youtube.com/watch?v=BcmPW3ji_MA

1. Create a new Android Compose application

We run Android and we press New Project button

image

Then we select the Empty Activity template

image

This is the code for the new application

image

2. Add dependencies

We add the following dependencies in the build.gradle.kts(app) file

implementation ("androidx.biometric:biometric:1.1.0")
implementation ("androidx.appcompat:appcompat:1.4.1")

image

3.