A bit of a weird issue when using the fingerprint scanner in Android 6.0 (Marshmallow) that I am stuck with and can't figure out.
I have searched all over but can only see things related to hardware defects.
The application accepts, encrypts, decrypts and validates fingerprints just fine, however it only allows 5 attempts before it for some reason stops working. (More on that below)
I have setup the application to allow the user four scan attempts before implementing a security lockout timer, however if I intentionally fail to authenticate 4 times. Then I wait to lockout period of 5 minutes and come back I can only scan my finger once, after that the fingerprint appears to stop listening until I force quit the application from Applications Manager?
It then accepts fingerprints again.
Code for authenticationFailed callback:
@Override
public void onAuthenticationFailed() {
authenticationDialog.dismiss();
cancellationSignal.cancel();
//Add one to the number of attempts taken
attemptCount += 1;
if (attemptCount < maxAttempAllowance) {
AlertDialog.Builder message = new AlertDialog.Builder(appContext);
message.setTitle("Authentication Failed");
message.setMessage("The finger you scanned is not registered in your devices settings or your device failed to identify you.");
message.setPositiveButton("Try Again", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
showAuthenticationDialog();
startAuth(manager, cryptoObject);
}
});
message.setIcon(R.drawable.cross_flat);
message.setCancelable(false);
message.show();
}
else {
AlertDialog.Builder message = new AlertDialog.Builder(appContext);
message.setTitle("Authentication Failed");
message.setMessage("You have exceeded the maximum login attempts allowed. Try again in 5 minutes.");
message.setIcon(R.drawable.cross_flat);
message.setCancelable(false);
message.show();
setSecurityBanTimer();
}
}
Even without the lockout security code the scanner still only accepts 5 prints.
Restart Your Phone Restarting your phone can get rid of some minor issues, such as an unstable Wi-Fi connection, frozen apps, or a faulty fingerprint sensor. So, the best fix for your fingerprint sensor might just be restarting it.
The fingerprint sensor may not work if your hand is wet, moist, oily, or dirty. So, if your finger has any of these, you might not be able to unlock your phone using the fingerprint. The way out is to wash your hands, clean them, and wait for them to dry out. Now try to unlock your phone with your fingerprint.
Ensure your device is not being wirelessly charged and try again. If your fingerprint still isn't being recognised, you can try removing and then registering your fingerprint again.
Also, on some Android phones, you can long-press the power button for about 10s to automatically reboot your device. Update your software. Another software-related issue that may cause the “ fingerprint sensor not working” issue is a software bug. Try checking if you have a pending update on your device and install it.
Device implementations with a secure lock screen SHOULD include a fingerprint sensor. If a device implementation includes a fingerprint sensor and has a corresponding API for third-party developers, it: MUST rate limit attempts for at least 30 seconds after 5 false trials for fingerprint verification.
Check if your finger has any liquid or dirt. Before nailing down your fingerprint problem to be a hardware or software defect, check your fingers. Just like any other biometric gadgets, your phone fingerprint needs a clean finger to be able to unlock your device.
After the backup, kindly go to Settings >> System>> Factory Reset>> Erase everything >> confirm your password and reset your device. Make sure you have enough battery before doing this. Now try adding back your fingerprint after the phone reboots. If it works, you're good to go.
I have found at that the API forces the security to have a 30 second gap between 5th and further attempts.
This means that the scanner will be unresponsive after the 5th attempt if the security of the application sets lockout at 4.
Documentation:
Device implementations with a secure lock screen SHOULD include a fingerprint sensor. If a device implementation includes a fingerprint sensor and has a corresponding API for third-party developers, it: MUST rate limit attempts for at least 30 seconds after 5 false trials for fingerprint verification.
Find information here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With