Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android fingerprint sensor cancel error if grabbed by another app

I'm using FingerprintManager in my app and usually all works fine. The main issue I have is that customers sometimes complain that the fingerprint operation is sometimes cancelled, what I can see in the logs as error 5 (Fingerprint operation canceled). Now, I know that other apps not developed good can hold the sensor if they do not release it on inPause or similar, so even lockscreen can't use the sensor. Is there a way to get around this issue and force the sensor to start working with my app again?

Thanks

like image 584
Noam Ma-Yafit Avatar asked Oct 07 '16 06:10

Noam Ma-Yafit


People also ask

How do you fix an error has occurred with the fingerprint sensor?

To do so: Go to the “Settings menu” and then search for fingerprint data or management. After that, delete the fingerprint data and try to add a new fingerprint again. After completing it, restart your device and check whether it works or not.

How does biometric authentication work in Android?

Authentication using a screen lock credential – the user's PIN, pattern, or password. To begin using an authenticator, the user needs to create a PIN, pattern, or password. If the user doesn't already have one, the biometric enrollment flow prompts them to create one.

What is biometrics on an app?

Biometric login provides a convenient method for authorizing access to private content within your app. Instead of having to remember an account username and password every time they open your app, users can just use their biometric credentials to confirm their presence and authorize access to the private content.

What is Android fingerprint?

Fingerprint detection may be used to unlock a device, sign in to apps, and authenticate in-app purchases. Standard fingerprint. Enrollment. Authentication.


1 Answers

I faced the same issue, there is an issue raised around this with Android.

https://code.google.com/p/android/issues/detail?id=208512

Here is how I am handling it in my code.

if (errMsgId != FINGERPRINT_ERROR_CANCELED) {
    // As you see below that error code happens when device is locked.
}

enter image description here

like image 151
Amit Garg Avatar answered Sep 24 '22 13:09

Amit Garg