Skip to main content

Android setup

Declare the biometric permission in android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.USE_BIOMETRIC" />

It is a normal permission, granted at install; there is no runtime request.

:::warning Without the permission, nothing is enrolled

BiometricManager throws a SecurityException without USE_BIOMETRIC. The module catches it: the status methods report no enrollment, and authenticate resolves with not_available and a warning that names the missing permission.

:::

Requirements​

  • Android 8 (API 26) or later. Biometric prompts need Android 10 (API 29); on Android 8 and 9 only the device credential is available. See Android versions.
  • The prompt is shown on the current NitroUI activity, which the NitroUI host provides. No AndroidX biometric library is added.

Testing on the emulator​

A fresh emulator has no screen lock and no fingerprints. Set a PIN in Settings > Security, add a fingerprint, then touch the sensor from the emulator's Extended controls > Fingerprint while the prompt is open.