{"id":18663810,"url":"https://github.com/lopspower/biometric","last_synced_at":"2026-04-02T02:43:52.119Z","repository":{"id":57726668,"uuid":"232071793","full_name":"lopspower/Biometric","owner":"lopspower","description":"The easiest way is to use the new version of Biometric under AndroidX 🔒","archived":false,"fork":false,"pushed_at":"2021-07-21T07:34:55.000Z","size":2992,"stargazers_count":140,"open_issues_count":1,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-01T21:18:47.575Z","etag":null,"topics":["android","androidx","biometric"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lopspower.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-01-06T09:55:51.000Z","updated_at":"2024-03-28T19:51:38.000Z","dependencies_parsed_at":"2022-09-26T21:50:57.223Z","dependency_job_id":null,"html_url":"https://github.com/lopspower/Biometric","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FBiometric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FBiometric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FBiometric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lopspower%2FBiometric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lopspower","download_url":"https://codeload.github.com/lopspower/Biometric/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223480659,"owners_count":17152146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","androidx","biometric"],"created_at":"2024-11-07T08:19:51.729Z","updated_at":"2026-04-02T02:43:52.060Z","avatar_url":"https://github.com/lopspower.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"/preview/header.png\"\u003e\u003c/p\u003e\n\nBiometric\n=================\n\n\u003cimg src=\"/preview/face.gif\" alt=\"sample\" title=\"sample\" width=\"250\" height=\"509\" align=\"right\" /\u003e\n\n[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)\n[![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16)\n[![Maven Central](https://img.shields.io/maven-central/v/com.mikhaellopez/biometric.svg?label=Maven%20Central)](https://search.maven.org/artifact/com.mikhaellopez/biometric)\n[![Twitter](https://img.shields.io/badge/Twitter-@LopezMikhael-blue.svg?style=flat)](http://twitter.com/lopezmikhael)\n\nThe easiest way is to use the new version of [Biometric](https://developer.android.com/jetpack/androidx/releases/biometric) under [AndroidX](https://developer.android.com/jetpack/androidx).\n\nYou can easily know if the device allows you to use \u003cb\u003eBiometric\u003c/b\u003e and under what type (FACE, FINGERPRINT, IRIS, MULTIPLE...). The library also provides a [CryptoObject](https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.CryptoObject) implementation if you want to implement it on your side on [CryptoHelper](/biometric/src/main/java/com.mikhaellopez.biometric/CryptoHelper.kt).\n\n\u003ca href=\"https://play.google.com/store/apps/details?id=com.mikhaellopez.lopspower\"\u003e\n  \u003cimg alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" /\u003e\n\u003c/a\u003e\n\nUSAGE\n-----\n\nTo used this usefull library you can grab it via Gradle:\n\n```groovy\nimplementation 'com.mikhaellopez:biometric:1.1.0'\n```\n\nKOTLIN\n-----\n\n```kotlin\nval biometricHelper = BiometricHelper(fragment)\n\n// BiometricType = FACE, FINGERPRINT, IRIS, MULTIPLE or NONE\nval biometricType: BiometricType = biometricHelper.getBiometricType()\n\n// Check if biometric is available on the device\nbtnStart.visibility = if (biometricHelper.biometricEnable()) View.VISIBLE else View.GONE\n\nbtnStart.setOnClickListener {\n    biometricHelper.showBiometricPrompt(\n        BiometricPromptInfo(\n            title = \"Title\", // Mandatory\n            negativeButtonText = \"Cancel\", // Mandatory\n            subtitle = \"Subtitle\",\n            description = \"Description\",\n            confirmationRequired = true\n        )\n    ) {\n        // Do something when success\n\n    }\n}\n```\n\nYou can also handle error and failed like this:\n\n```kotlin\nbiometricHelper.showBiometricPrompt(promptInfo,\n    onError = { errorCode: Int, errString: CharSequence -\u003e\n        // Do something when error\n                    \n    }, onFailed = {\n        // Do something when failed\n                    \n    }, onSuccess = { result: BiometricPrompt.AuthenticationResult -\u003e\n        // Do something when success\n                    \n    })\n```\n\nDEMO\n-----\n\n| Dark Mode                                                                                 | Biometric Fingerprint                                                                                   | Old Fingerprint                                                                                         |\n| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |\n| \u003cimg src=\"/preview/face_dark.gif\" alt=\"sample\" title=\"sample\" width=\"250\" height=\"509\" /\u003e | \u003cimg src=\"/preview/finger_new.gif\" alt=\"sample\" title=\"sample\" width=\"250\" height=\"486\" align=\"left\" /\u003e | \u003cimg src=\"/preview/finger_old.gif\" alt=\"sample\" title=\"sample\" width=\"250\" height=\"430\" align=\"left\" /\u003e |\n\nSUPPORT ❤️\n-----\n\nFind this library useful? Support it by joining [**stargazers**](https://github.com/lopspower/Biometric/stargazers) for this repository ⭐️\n\u003cbr/\u003e\nAnd [**follow me**](https://github.com/lopspower?tab=followers) for my next creations 👍\n\nLICENCE\n-----\n\nBiometric by [Lopez Mikhael](http://mikhaellopez.com/) is licensed under a [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flopspower%2Fbiometric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flopspower%2Fbiometric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flopspower%2Fbiometric/lists"}