Open gaglia opened 4 months ago
Can you send an exception?
protected override async void OnAppearing()
{
base.OnAppearing();
try
{
var type = await BiometricAuthentication.Current.GetAuthenticationTypeAsync();
AuthenticationTypeLabel.Text = $"Auth Type: {type:G}";
await AuthenticateAsync(reason: "Prove you have fingers!");
}
catch(Exception exception)
{
// Set break point here
}
}
Hi,
I don't get any exceptions, BiometricAuthentication.Current.AuthenticateAsync instead exits with error status "UnknownError" with this message: FragmentManager is already executing transactions
Doing some other tests it seems that inserting a delay of 2 seconds in the OnAppearing event opens the biometric recognition PopUp correctly.
protected override async void OnAppearing()
{
base.OnAppearing();
await Task.Delay(2000);
try
{
var type = await BiometricAuthentication.Current.GetAuthenticationTypeAsync();
AuthenticationTypeLabel.Text = $"Auth Type: {type:G}";
await AuthenticateAsync(reason: "Prove you have fingers!");
}
catch (Exception exception)
{
var x = exception.ToString();
}
}
Hi,
I'm trying to use the plugin to enable biometric authorization on the login page of my application.
So I would like the finger recognition PopUp to appear immediately when opening my Login view.
I tried to simulate this starting from your example by simply adding the AuthenticateAsync call on the OnAppearing event of the MainPage:
`protected override async void OnAppearing() { base.OnAppearing();
var type = await BiometricAuthentication.Current.GetAuthenticationTypeAsync(); AuthenticationTypeLabel.Text = $"Auth Type: {type:G}";
await AuthenticateAsync(reason: "Prove you have fingers!"); }`
Can you help me understand the problem? Thanks a lot
Steps to reproduce
Expected behavior
Open biometric authentication when opening the view
Actual behavior
Authentication fails without displaying the PopUp to the user to recognize the fingerprint
Configuration
Version of the Package: 1.0.1
Platform: Android 13
Device: Nokia G50