Giter Site home page Giter Site logo

janirefdez / biometricsauthentication Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 105 KB

Basic android example where you can find how to implement Biometrics Prompt.

Kotlin 100.00%
android kotlin biometrics biometric-authentication android-biometric-prompt android-biometric

biometricsauthentication's Introduction

BiometricsAuthentication

Kotlin Android Gradle

Basic android example where you can find how to implement Biometrics Prompt

Requirements

  • Android API 21 - 31
  • Gradle 7.2
  • Kotlin 1.6.10

Functionalities

There are multiple options to display biometrics prompt. In this example there are 4 options:

  • Unlock with Biometric String: Fingerprint authentication prompt will appear

image

  • Unlock with Biometric Weak: Fingerprint and Face authentication prompt will appear
image image
- `Unlock with Device Credential`: Device credential authentication prompt will appear (pattern or pin code authentication)

image

  • Unlock with Biometric Weak and Device Credential: Fingerprint, Face and Device credential authentication prompt will appear

image

Notes

  • Prompt's description can be modified setDescription("New Description")
    • In this case it has not been modified, so in the screenshots you can see that the description is in another language. The description is set to the default value and is set to the language of the device.
BiometricPrompt.PromptInfo.Builder().apply {
            setTitle(activity.getString(R.string.prompt_info_title))
            setDescription("New Description")
            setAllowedAuthenticators(BiometricManager.Authenticators.BIOMETRIC_WEAK or BiometricManager.Authenticators.DEVICE_CREDENTIAL)
            setConfirmationRequired(false)
        }.build()
  • Same in option Unlock with Biometric Weak and Device Credential, the device credential authentication button is set based on the device settings (pattern or PIN code) and also set based on the device language.

  • This example has been done with Biometric Library 'androidx.biometric:biometric-ktx:1.2.0-alpha04'

  • To know more about biometrics check this link

biometricsauthentication's People

Contributors

janirefdez avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kmandalas

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.