Skip to content
Biometricks - Tricks for Android Biometrics
Branch: master
Clone or download

Biometricks - Tricks for Android Biometrics


Provides various hacks/tricks to help work with the AndroidX Biometric APIs.


  • The ability to detect the type of Biometric the device supports for better user messaging.
  • Ability to detect the need to show a loading dialog for API 28.
  • 100% Kotlin API, no Java support is planned.
Fingerprint Face


The AndroidX Biometric Library doesn't tell you what type of Biometric feature the device has and will be used. This library figures that out for you so you can create better user messaging than just "Biometric" in most cases.


val biometricks = Biometricks.from(applicationContext)

val biometricName = when (biometricks) {
    Face -> "Face"
    Fingerprint -> "Fingerprint"
    Iris -> "Iris"
    Multiple -> "Biometric"

CryptoObject Required

In order to correctly have the UI show the detected biometric type, we encourage you to use our helper functions. It will require you to pass a BiometricPrompt.CryptoObject.

        title = "Authenticate with $biometricName",
        negativeButtonText = "Cancel",
        cryptoObject = cryptoObject
) { showLoading ->
    // Show a loading view for API 28 issues if you want

NOTE: This type is only valid when you show a BiometricPrompt and send in a CryptoObject.

The Types of Biometricks (Source)

sealed class Biometricks {

    /** The device has no support for Biometric Authentication */
    object None : Biometricks()

    /** The device has support for Biometric Authentication */
    sealed class Available : Biometricks() {
        object Face : Available()
        object Fingerprint : Available()
        object Iris : Available()
        object Multiple : Available()
        object Unknown : Available()

Related Content


You can’t perform that action at this time.