Repository: flutter
Issue: [local_auth] [android] Non-biometrics authentication gives NotAvailable on Android 10
Labels: platform-android,p: local_auth,package,e: OS-version specific,P2,team-android,triaged-android

### What package does this bug report belong to?

local_auth

### What target platforms are you seeing this bug on?

Android

### Have you already upgraded your packages?

Yes

### Dependency versions

<details><summary>pubspec.lock</summary>

```lock
  local_auth:
    dependency: "direct main"
    description:
      name: local_auth
      sha256: "280421b416b32de31405b0a25c3bd42dfcef2538dfbb20c03019e02a5ed55ed0"
      url: "https://pub.dev"
    source: hosted
    version: "2.2.0"
  local_auth_android:
    dependency: transitive
    description:
      name: local_auth_android
      sha256: e0e5b1ea247c5a0951c13a7ee13dc1beae69750e6a2e1910d1ed6a3cd4d56943
      url: "https://pub.dev"
    source: hosted
    version: "1.0.38"
  local_auth_darwin:
    dependency: transitive
    description:
      name: local_auth_darwin
      sha256: "33381a15b0de2279523eca694089393bb146baebdce72a404555d03174ebc1e9"
      url: "https://pub.dev"
    source: hosted
    version: "1.2.2"
  local_auth_platform_interface:
    dependency: transitive
    description:
      name: local_auth_platform_interface
      sha256: "1b842ff177a7068442eae093b64abe3592f816afd2a533c0ebcdbe40f9d2075a"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.10"
  local_auth_windows:
    dependency: transitive
    description:
      name: local_auth_windows
      sha256: "505ba3367ca781efb1c50d3132e44a2446bccc4163427bc203b9b4d8994d97ea"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.10"
```

</details>


### Steps to reproduce

I try to use local_auth with a Zebra TC26BK phone. 

At security / screen lock, there are only Swipe, Pattern, PIN and Password options on this phone.

I set my screen lock to PIN method, and tried with Pattern also.

I setup my project with FlutterFragmentActivity() and added android.permission.USE_BIOMETRIC to the manifest, according to the documentation Android Integration section.

auth.canCheckBiometrics works good, gives me FALSE. 

auth.isDeviceSupported() returns TRUE, so the queries working good.

But when I try to authenticate,  with ```final didAuthenticate = await auth.authenticate(localizedReason: 'please log in', options: const AuthenticationOptions(biometricOnly: false));```, I get ```PlatformException(NotAvailable, Security credentials not available., null, null)```.

The PIN screen never appears, and I cannot login with PIN to my application.

I tried with the Plugin example app, and it gives me the same result:
![IMG_2712](https://github.com/flutter/flutter/assets/46342567/2169dc8e-f49a-44ef-b4ca-2e2b1b674608)


How can I resolve this problem?

### Expected results

Have a PIN screen.

### Actual results

No PIN screen appears, only ```PlatformException(NotAvailable, Security credentials not available., null, null)```.


### Code sample

example code in your repository.

### Screenshots or Videos

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console

```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
$ flutter doctor -v
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-HU)
    • Flutter version 3.19.6 on channel stable at /Users/developer/Documents/Programming/install/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (9 days ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/developer/Library/Android/sdk/
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Community Edition (version 2024.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin version 241.15845

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (4 available)
    • TC26 (mobile)                        • 20347523020614 • android-arm64  • Android 10 (API 29)
    • Android SDK built for arm64 (mobile) • emulator-5556  • android-arm64  • Android 10 (API 29) (emulator)
    • macOS (desktop)                      • macos          • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)                         • chrome         • web-javascript • Google Chrome 119.0.6045.123

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>