Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

onFailure is called for no reason #4

Closed
hatpick opened this issue Mar 23, 2016 · 3 comments
Closed

onFailure is called for no reason #4

hatpick opened this issue Mar 23, 2016 · 3 comments

Comments

@hatpick
Copy link

hatpick commented Mar 23, 2016

I'm using reprint on a phone with api 23 but no fingerprint sensor. onFailure gets called immediately.

@ajalt
Copy link
Owner

ajalt commented Mar 24, 2016

That's by design. What would you expect to happen?

@hatpick
Copy link
Author

hatpick commented Mar 24, 2016

Nothing should happen, when you don't have a sensor but you have the api available on your phone you haven't tried your fingers for authentication, so no failure, no authentication should happen.

@ajalt
Copy link
Owner

ajalt commented Mar 24, 2016

No authentication does happen. I would be a terrible design to just never call any listener callbacks. If the user hasn't registered a fingerprint, onFailure is called with an error code of NO_FINGERPRINTS_REGISTERED so that your UI can inform the user. You can check Reprint.hasFingerprintRegistered() if you want to check for that situation before calling Reprint.authenticate()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants