Android Fingerprint only allows 5 attempts at a period of time
Asked Answered
A

2

9

I am developing an Android App that requires fingerprint to open an Activity. I just noticed when I unlock my phone using my fingerprint, the number of attempts to scan a fingerprint in my app only becomes 4.

For example:

  • Phone is locked

  • Unlock phone using fingerprint

  • Open my fingerprint app

  • Cannot attempt to scan a fingerprint more than 4 times

Another scenario:

  • Fingerprint app is open

  • Only 5 attempts will be accepted, app will no longer attempt to scan a fingerprint

  • Wait for a period of time, again, only 5 attempts within a duration will be accepted

Is there a workaround for this?

Adamson answered 11/5, 2016 at 2:53 Comment(0)
A
6

I did some research and found the Android 6.0 Compatibility Definition Document.

This was stated under the Fingerprint Sensor section:

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.

So.. I guess there's no workaround for this at the moment.

Adamson answered 11/5, 2016 at 3:36 Comment(3)
Corrent document link is here -> source.android.com/compatibility/6.0/…Truax
shortly: maximum = 5 false trials ThanksWrap
> [C-1-5] MUST rate limit attempts for at least 30 seconds after five false trials for fingerprint verification. source.android.com/compatibility/…Chapeau
D
3

Came across this stackoverflow when searching for the same issue I was having.

Anyways, with the latest API BiometricPrompt, we can now customize the behavior by overriding the AuthenticationCallback

BiometricPrompt.AuthenticationCallback() {
    override fun onAuthenticationError(
        errorCode: Int,
        errString: CharSequence
    ) {
        super.onAuthenticationError(errorCode, errString)
    }

    override fun onAuthenticationSucceeded(
        result: BiometricPrompt.AuthenticationResult
    ) {
        super.onAuthenticationSucceeded(result)
    }

    // called when an attempt to authenticate with biometrics fails
    // i.e. invalid fingerprint
    override fun onAuthenticationFailed() {
        super.onAuthenticationFailed()
        // keep track of a counter here and decide when to dismiss the dialog
        biometricPrompt?.cancelAuthentication()
    }
}
Doughboy answered 28/10, 2020 at 4:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.