Flutter local_auth issues on android certain devices

1.2k views Asked by At

I'm currently having issues with local_auth on certain devices: LG-G6 (Android 7.0) and Samsung Galaxy J7 Pro (Both running on android 7), and i believe there's more android devices having this issue.

Authentication always fails on the authenticateWithBiometrics function:

//Always failes here:

var localAuth = LocalAuthentication(); bool didAuthenticate = await localAuth.authenticateWithBiometrics( localizedReason: 'Please authenticate.');

But again, it's only failing on the above mentioned devices. I checked on 3 project that are currently using local auth and they also failing, even the developers of those projects where not aware.

Is this a known issue?

1

There are 1 answers

1
Tshepo Sibiya On

Inside the Android project, on styles.xml

i replaced:

<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">

With:

<style name="LaunchTheme" parent="Theme.AppCompat.Light.NoActionBar">

After debugging the app with the devices that had issues i realised that it was throwing a platform exception and complaining about the Theme.AppCompat that is missing.

Hope this helps anyone who faces the same issue