Biometric

Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
November 7, 2019 1.0.0 - - -

Declaring dependencies

To add a dependency on Biometric, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    implementation "androidx.biometric:biometric:1.0.0"
  }

For more information about dependencies, see Add Build Dependencies.

Version 1.0.0

Version 1.0.0

November 7, 2019

androidx.biometric:biometric:1.0.0 is released with no changes since 1.0.0-rc02. Version 1.0.0 contains these commits.

Major features of 1.0.0

  • Compatibility version of the BiometricPrompt and BiometricManager APIs, as implemented in Android 10, with full feature support back to Android 6.0 (API 23)
  • Built-in lifecycle management for BiometricPrompt within a Fragment or FragmentActivity
  • Special handling for devices known to incorrectly present weak biometrics during crypto-based authentication

Version 1.0.0-rc02

October 23, 2019

androidx.biometric:biometric:1.0.0-rc02 is released. Version 1.0.0-rc02 contains these commits.

Bug fixes

  • Added a workaround for certain devices that are known to incorrectly provide a weak biometric when crypto-based authentication is invoked on API versions 28 and 29 (b/142150327)

Version 1.0.0-rc01

October 9, 2019

androidx.biometric:biometric:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits.

Bug fixes

  • Fixed a potential crash with FingerprintDialogFragment when dismissing it while the screen is rotating (b/141356362)
  • Fixed an issue where receiving a null AuthenticationResult from the framework API could cause a crash (b/138862251)
  • Fixed crashes caused by BiometricPrompt being dismissed after onSaveInstanceState() (b/138825362, b/140447194)

Version 1.0.0-beta02

September 18, 2019

androidx.biometric:biometric:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug fixes

  • Fixed issues with device credential support in version 1.0.0-beta01
  • Removed Java 8 dependencies and switched to depending on Java 7 (b/140508526)
  • FingerprintHelperFragment now correctly throws ERROR_HW_NOT_PRESENT when no fingerprint hardware is detected (b/140427586)

Version 1.0.0-beta01

August 29, 2019

androidx.biometric:biometric:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

New features

We’ve introduced a second constructor for BiometricPrompt that allows it to be hosted in a Fragment (as opposed to the existing constructor, which requires a FragmentActivity).

We’re also excited to bring the following functionality from Android 10 to the AndroidX Biometric library:

  1. BiometricManager#canAuthenticate
  2. BiometricPrompt.PromptInfo#setConfirmationRequired
  3. BiometricPrompt.PromptInfo#setDeviceCredentialAllowed

On Android 10, the library will invoke the corresponding methods from the platform API. On older API levels, the library will emulate the behavior.

API changes

  • Added fragment-specific constructor for biometric prompt (b/131980596)
  • See the “New features” section above.

Bug fixes

  • Add BiometricPrompt device credential support for L+
  • Fixed BiometricPrompt to use public error constants (b/137788194)
  • Fix NullPointerException in BiometricPrompt.onAttach() (b/136103103)
  • Changed behavior to not allow BiometricPrompt to be cancelled by a touch event outside the prompt (b/135684487)
  • Fixed onAuthenticationError crash when a null error value is returned in Kotlin (b/128350861)
  • FingerprintDialogFragment is now style-able (b/127878106)
  • FingerprintDialog is now scrollable (b/126367887)
  • Fixed bug where rotating the biometric dialog raises an IllegalStateException (b/124153656), (b/123811924)
  • Fixed inconsistent behavior on API Levels 23 to 27. (b/124066957)
  • Fixed issue where Fingerprint Login Dialog read incorrect text using Talkback. (b/123572331)

Version 1.0.0-alpha04

April 3, 2019

androidx.biometric:biometric:1.0.0-alpha04 is released. The commits included in this version can be found here.

Bug fixes

  • Fixed Biometric fragments don't clean up in all cases. (b/121117380)
  • Fixed BiometricPrompt only allows one instance of BiometricPrompt.AuthenticationCallback (b/123857949)
  • Fixed BiometricPrompt error behavior inconsistent between system and compat versions. (b/123572326)
  • Fixed callback onAuthenticationError() with @NotNull errString causes NullPointerException at runtime (b/123167217)
  • Fixed androidx.BiometricPrompt Cancel button Crashes (b/122054485)
  • Fixed androidx.biometric.PromptInfo title/description not changed on Android P (b/122856773)

Version 1.0.0-alpha03

December 17, 2018

Bug fixes

  • Fixed fragment-related issues
  • On devices O and older, lockout errors are returned immediately to be consistent with P and above