Use default face Unlock functionality in own Android app

1k views Asked by At

I want to enable fingerprint and face unlock for my application. I have fingerprint unlock code and it is working fine if the user is already registered his fingerprint.

I want to enable the same feature for face unlock as well. If the user has already enrolled his face id, then he should be able to authenticate the app with face unlock. I don't want to create any library here, I just want to invoke the device face unlock app and authenticate.

1

There are 1 answers

2
Peter Friese On

Starting with Android P, you can use the BiometricPrompt API - it will automatically support whichever biometric authentication mechanism is physically present on the user's phone.

See this blog post for a brief overview of the feature, and the docs for how to implement this. This blog post contains a walk-through of all the steps to implement this.