Closed razam217 closed 5 years ago
Please provide a use case. Why would you need to hide the dialog?
When I resume my app, it asks me for the touchID and I do not enter it also I do not cancel and directly move the app to background state. Now when I resume my app, it first shows error on touchID dialog i.e. 'Finger print not recognized try again.' and then opens another dialog without that error, but that does not respond when I try to enter touchID.
That would be an implementation error and not an issue with the plugin. If your application goes into the background while the dialog is open, the expectation would be that the dialog would still be open when your application resumes. The problem is that you are triggering the dialog to open in on resume, so your app is trying to open a second dialog, which is causing a problem.
You should set a flag in your app to indicate if the dialog has been open and save that state when your application goes to the background. In on resume, if that flag indicates that the dialog is open, do not try to show another dialog.
Thanks a lot, that really helped. It was an implementation error.
Following Use case:
Can we re-open this issue somehow? And if necessary, we'd be happy to contribute a change...
Our use case is a bit complex. Imagine an app where external events (e.g. push notifications) are controlling, which authentication methods (fingerprint or password) are permitted.
Let's assume a push notification arrives that allows using a fingerprint for authentication. The app opens and we show the fingerprint dialog, because that is what the incoming push notification tells us to do.
Unfortunately the user decides to ignore that, and triggers another event that again leads to opening the app. But this time, fingerprint is not permitted, the app unlock must only be possible by entering the password. In this case, the fingerprint dialog is still showing up but should be closed...
Do you understand that there are thinkable use cases that can only be solved by programmatically closing the dialog?
Understood. I have a local branch where I implemented the hide()
method. I will merge that branch and push a new version for you to test.
Actually I named it dismiss()
I have published version 1.5.0
Wow, I'm impressed! Thanks, we'll be testing the new version.
There should be a FingerprintAuth.hide() method to hide the dialog.