Android Biometric Prompt is not dismissed when device home button is pressed
Asked Answered
P

1

8

When Biometric prompt is shown in App with setDeviceCredentialAllowed(true), It is not dismissed when device home button is pressed. It throws BiometricPrompt.ERROR_USER_CANCELED error and keeps the System UI as is.

Did any one face this issue ? Is there any workaround kind of thing ?

Note : I am using androidx.biometric:biometric:1.0.1

Note: Its Android bug. https://issuetracker.google.com/issues/149770989

Proteiform answered 19/2, 2020 at 9:12 Comment(7)
I don't understand why my question is downvoted. It's a kind of undesired behaviour for App user from Android. Error code is returned and dialogue is not dismissed, un dismissed dialogue will not even accept fingerprint and "USE PIN". At least from logs I can say that is a leak. I am blocked on this and expecting some help from SO community. Attempt to invoke virtual method 'void android.content.res.StringBlock.close() on a null object reference at android.content.res.ApkAssets.close(ApkAssets.java:195) at java.lang .Thread.run(Thread.java:919) W/System: A resource failed to call release.Proteiform
It's an important question, i'll give you my upvoteCrossways
Also ERROR_USER_CANCELLED can be thrown when you provide the wrong finger or your finger could not be read within 5 attempts of the try.Crossways
They are just not handling error number 5 (USER_CANCELLED) Because it can be thrown in multiple scenarios and they only handle the one that user clicks the cancel buttonCrossways
I'm struggling because biometric does not work the same way on samsung galaxy s8/s9/s10 You should check those if you canCrossways
@LenaBru Thanks again. I will add those testcases.Proteiform
#59090810 his problem is that face ID is defined on the deviceCrossways
C
1

I found this bug when I tried this library. The problem is they implemented it as a fragment, and it's not responding well to this thing.

I opted out of using this library all together and just implemented it myself.

Crossways answered 19/2, 2020 at 10:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.