Constant USE_FINGERPRINT
was deprecated in API level 28 and we should use more generic USE_BIOMETRIC
which has been added in same API level.
I
biometrics API provides BiometricConstants for error handling
override fun onAuthenticationError(errorCode: Int, errString: CharSequence) {
super.onAuthenticationError(errorCode, errString)
//The device does not have a biometric sensor.
if (errorCode == BiometricPrompt.ERROR_HW_NOT_PRESENT){
//Do something
}
}