Git Product home page Git Product logo

biometric's Introduction

Biometric

sample

Platform API Download
Twitter Codacy Badge

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.0.2'

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.

biometric's People

Contributors

lopspower avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.