Android : Access functionality of FaceManager like FingerprintManager

306 Views Asked by At

How to implement an acess class for FaceManager service like FingerprintManagerCompat in fingerprint?

direct acess give this error:

error: package android.hardware.face does not exist
import android.hardware.face.FaceManager;
                            ^
1

There are 1 best solutions below

2
Jameido On

As the error says FaceManager is not available, to use biometric authentication (face and fingerprint) you should integrate BiometricManager which replaced the now deprecated FingerprintManagerCompat.

EDIT

As quoted here what you want to achieve doesn't seem possible

FaceManager is a private interface that maintains a connection with FaceService. It's used by Keyguard to access face authentication with a custom UI. Apps don't have access to FaceManager and must use BiometricPrompt instead.