Flutter local_auth issues on android certain devices

589

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

Share:
589
Tshepo Sibiya
Author by

Tshepo Sibiya

Angular/Flutter Developer from Johannesburg - SA

Updated on December 02, 2022

Comments

  • Tshepo Sibiya
    Tshepo Sibiya over 1 year

    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?

  • upender
    upender about 2 years
    I applied this but not working. I am facing the issue in oppo phones.