Skip to content
Advertisement

‘canAuthenticate()’ is deprecated in android

What should I use instead of biometricManager.canAuthenticate() is deprecated.

Doc says

This method is deprecated. Use canAuthenticate(int) instead.

JavaScript

How to use canAuthenticate(int) like the above manner.

Advertisement

Answer

The direct replacement for your code would look something like:

JavaScript

According to the javadoc, the possible return values are BIOMETRIC_SUCCESS, BIOMETRIC_ERROR_HW_UNAVAILABLE, BIOMETRIC_ERROR_NONE_ENROLLED, BIOMETRIC_ERROR_NO_HARDWARE, or BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED., as before.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement