smstuebe / xamarin-fingerprint

Xamarin and MvvMCross plugin for authenticate a user via fingerprint sensor
Microsoft Public License
490 stars 115 forks source link

FingerprintAuthenticationResultStatus.Failed returned with some type of emulators and devices using Android 10+ #211

Open olivertech opened 2 years ago

olivertech commented 2 years ago

In some emulators and devices running Android 10+ it throwing a failed status, without using the finger or pressing button on emulator device, to simulate finger print.

The problem happend in this line below, using Pixel 3a Q 10.0 - API 29 (Android 10) emulator. In physical devices running Android 10 and 11, has also the same problem.

var authResult = await CrossFingerprint.Current.AuthenticateAsync(conf);

The problem do not happens in emulators below Android 10, like the ones, listed below:

Steps to reproduce

  1. Just install Pixel 3a Q 10.0 API 29 (Android 10) emulator - It is one of the devices... There are others using Android 10+ to reproduce the problem. Any emulator ou devide using Android 10 or over

Expected behavior

Biometric popup should appears and stay on, until the finger print is used. The problem happens only in the first time. After this, in the second time and so on, biometric popup appears and stays on, waiting finger print.

Actual behavior

Biometric popup shows very quickly and disappears, throwing the status "FingerprintAuthenticationResultStatus.Failed" This happens only in the first try.

The line below works after second try.

var authResult = await CrossFingerprint.Current.AuthenticateAsync(conf);

Crashlog

No crash error...

Configuration

Version of the Plugin: v2.1.4

Platform: Android 10+

Device: Pixel 3a Q 10.0 - API 29 (Android 10)

Xamarin Version: 4.7.0.1351 + MVVM Prism 7.2.0.1422

smsissuechecker commented 2 years ago

Hi @olivertech,

I'm the friendly issue checker. Thanks for using the issue template :star2: I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.