xamarin-fingerprint
xamarin-fingerprint copied to clipboard
Issue with cancel being called OnResume API24
Android emulator on API24
In my app I am calling .. var result = await CrossFingerprint.Current.AuthenticateAsync(Res.FingerprintAuthenticate);
it works fine until ......
When the app is sent to the background and then restored it issues a cancel.
I really need to call AuthenticateAsync again but when I do it IMMEDIATELY returns without interaction for some reason.
I have tried disposing the object and setting it to null and re-instansiating it ..... no luck
Any ideas ?
Hi @stephenhauck,
I'm the friendly issue checker. It seems like (100.00 %) you haven't used our issue template :cry: I think it is very frustrating for the repository owners, if you ignore them.
If you think it's fine to make an exception, just ignore this message. But if you think it was a mistake to delete the template, please close the issue and create a new one.
Thanks!
Had the same issue, disposing the plugin after authentication Worked for me:
CrossFingerprint.Dispose();
I tried dispose but it is reporting an error state.
On Feb 19, 2019, at 4:18 PM, Iustin Trotus [email protected] wrote:
Had the same issue, disposing the plugin after authentication Worked for me:
CrossFingerprint.Dispose();
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I updated to the latest NuGet and am still having an issue. I also tried to Dispose() in multiple places to no avail.
I call an async method to instantiate the fingerprint login .. it shows .... and works
But .. my app has a lock timer and there are two issues:
-
When the lock code runs and calls the fingerprint authenticate and the app is in the background it crashes. (will check and make sure we don't try to do this by checking to see if app is foreground)
-
When the fingerprint authenticate is visible if the user minimizes the app and then brings it to the foreground the fingerprint comes back as an "failed" and it seems these is no way to clear this and show the dialog again ??
ANY assistance is appreciated!
I updated to the latest plugin and changed the "state machine" of the unlock code and it seems to be working fine now .. I do have to put in a ticket if there isn't one, I need to know if they have enrolled fingerprints on iOS
Hi I seems to have the same problem ,as I get an error when trying to authenticate when i m coming from a background. How did you solve it? Also is this plugin still supported? Many thanks
As I stated above, you need to develop the appropriate state machine to make it work. The whole process of logging in ... canceling the login via fingerprint and then keeping in mind that TouchID is an OS level dialog that makes your app fire on resume whereas the Android fingerprint login does not .... sorry I can't be more specific right now but it came down to intercepting the right events in YOUR SPECIFIC application and security scheme and some extra code to track when something is cancelled versus failed and such ... does that help ?
@sphauck first many thanks for replying!. I should have mentioned its only android only I am concerned about. Not sure what I am doing wrong and what I should be doing. When I login normally it works, only when it goes in the background "OnResume (Android)" that it fails with error. as stated in my issue. I tried few things but nothing. Is there any snippet of code or action I should do when in background OnResume (app.xaml) as a workaround? Many thanks for any suggestions