Closed yougotnet closed 2 years ago
Hi @yougotnet,
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!
Hi @yougotnet
I have fixed this issue in my application by changing Line this
CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
to this
CrossFingerprint.SetCurrentActivityResolver(() => this);
Thanks! I finally got it working also.
I had to add these two line to the MainActivity.cs file for Android:
CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity); Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, savedInstanceState);
@yougotnet solution fixed it for me
Thanks @jayminnayak, It is working...
//Some times this may get exception //CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
//you can use this code if you are getting the exception. CrossFingerprint.SetCurrentActivityResolver(() => this);
Using Xamarin I installed the plugin. Added the two lines to the Android Manifest file Added the CrossFingerprint.SetCurrentActivityResolver()
It works fine in iOS but not Android
Here is the code to initiate fingerprint:
async void ConfigureFingerID() { var result = await CrossFingerprint.Current.IsAvailableAsync(true); if (result) { **var fingerprintAuthenticationResult = await CrossFingerprint.Current.AuthenticateAsync("myGopher Authentication");** if (fingerprintAuthenticationResult.Authenticated) { //await DisplayAlert("Finger ID", "Yes", "OK"); CrossSettings.Current.AddOrUpdateValue("FingerID", true); await DisplayAlert("Touch/Face ID Successful", "Touch/Face ID is now setup with the currently logged in writing number and password. If your password changes, you will have to setup Touch/Face ID again.", "OK"); } else { await DisplayAlert("Authentication Failed", "Touch/Face ID authentication failed", "OK"); } } else { await DisplayAlert("Touch/Face ID", "Touch/Face ID not available, make sure Touch/Face ID is setup on the device correctly.", "OK"); } }