• Stars
    star
    140
  • Rank 261,473 (Top 6 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The easiest way is to use the new version of Biometric under AndroidX πŸ”’

Biometric

sample

Platform API Maven Central Twitter

The easiest way is to use the new version of Biometric under AndroidX.

You can easily know if the device allows you to use Biometric and under what type (FACE, FINGERPRINT, IRIS, MULTIPLE...). The library also provides a CryptoObject implementation if you want to implement it on your side on CryptoHelper.

Android app on Google Play

USAGE

To used this usefull library you can grab it via Gradle:

implementation 'com.mikhaellopez:biometric:1.1.0'

KOTLIN

val biometricHelper = BiometricHelper(fragment)

// BiometricType = FACE, FINGERPRINT, IRIS, MULTIPLE or NONE
val biometricType: BiometricType = biometricHelper.getBiometricType()

// Check if biometric is available on the device
btnStart.visibility = if (biometricHelper.biometricEnable()) View.VISIBLE else View.GONE

btnStart.setOnClickListener {
    biometricHelper.showBiometricPrompt(
        BiometricPromptInfo(
            title = "Title", // Mandatory
            negativeButtonText = "Cancel", // Mandatory
            subtitle = "Subtitle",
            description = "Description",
            confirmationRequired = true
        )
    ) {
        // Do something when success

    }
}

You can also handle error and failed like this:

biometricHelper.showBiometricPrompt(promptInfo,
    onError = { errorCode: Int, errString: CharSequence ->
        // Do something when error
                    
    }, onFailed = {
        // Do something when failed
                    
    }, onSuccess = { result: BiometricPrompt.AuthenticationResult ->
        // Do something when success
                    
    })

DEMO

Dark Mode Biometric Fingerprint Old Fingerprint
sample sample sample

SUPPORT ❀️

Find this library useful? Support it by joining stargazers for this repository ⭐️
And follow me for my next creations πŸ‘

LICENCE

Biometric by Lopez Mikhael is licensed under a Apache License 2.0.

More Repositories

1

CircularImageView

Create circular ImageView in Android in the simplest way possible
Kotlin
1,949
star
2

CircularProgressBar

Create circular ProgressBar in Android β­•
Kotlin
1,698
star
3

CircularFillableLoaders

Realize a beautiful circular fillable loaders to be used for splashscreen 🌊
Java
1,222
star
4

BestAndroidGists

Find best Android Gist πŸ”₯
890
star
5

RxAnimation

Simple way to animate your views on Android with Rx πŸš€
Kotlin
590
star
6

AndroidWebServer

Android Web Server (NanoHttpd)
Java
433
star
7

CleanRxArchitecture

Clean Rx Kotlin Architecture sample on GitHub Api πŸš€
Kotlin
387
star
8

LazyDatePicker

LazyDatePicker an alternative to the native Android Date Picker πŸ“…
Java
372
star
9

RateBottomSheet

To help to promote your android app by prompting users to rate your app in a BottomSheet ⭐️
Kotlin
308
star
10

GradientView

Create gradient view in Android in the simplest way possible 🌈
Kotlin
197
star
11

HFRecyclerView

Add Header and/or Footer in your RecyclerView in the simplest way possible.
Kotlin
170
star
12

CircleView

Create circular view in android (change color, border & shadow) ⚫
Kotlin
165
star
13

PokeCardCompose

PokeCard Compose is a demo app 100% write in Compose, Flow and Koin based on MVI Clean Architecture 🐱⚑️
Kotlin
115
star
14

SaveInsta

Example dynamic update of your theme based on a main color
Java
85
star
15

AutoScrollTextView

Sample Android application show how to set auto scroll in text view in android.
Java
51
star
16

FavoriteAndroidLibrary

My Farorite Android Library
49
star
17

MyToast

Custom Toast on Android
Java
39
star
18

DualShot

With DualShot you take two photos with the front and the back camera, and share both of them in a single image.
Java
23
star
19

WebSideMVC

Structure MVC for Web Side in PHP
PHP
1
star