{"id":18687967,"url":"https://github.com/anitaa1990/biometric-auth-sample","last_synced_at":"2025-04-07T13:09:00.595Z","repository":{"id":38238322,"uuid":"140592825","full_name":"anitaa1990/Biometric-Auth-Sample","owner":"anitaa1990","description":"Add Biometric Authentication to any Android app","archived":false,"fork":false,"pushed_at":"2019-08-11T10:52:02.000Z","size":197,"stargazers_count":251,"open_issues_count":16,"forks_count":143,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-31T12:05:35.820Z","etag":null,"topics":["android","android-architecture-components","android-library","android-p","android-permissions","android-platform","android-sdk","android-sdk-library","androidp","biometricprompt","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anitaa1990.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-11T15:11:48.000Z","updated_at":"2025-02-08T19:08:48.000Z","dependencies_parsed_at":"2022-08-26T00:55:08.040Z","dependency_job_id":null,"html_url":"https://github.com/anitaa1990/Biometric-Auth-Sample","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/anitaa1990%2FBiometric-Auth-Sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anitaa1990%2FBiometric-Auth-Sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anitaa1990%2FBiometric-Auth-Sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anitaa1990%2FBiometric-Auth-Sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anitaa1990","download_url":"https://codeload.github.com/anitaa1990/Biometric-Auth-Sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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","android-architecture-components","android-library","android-p","android-permissions","android-platform","android-sdk","android-sdk-library","androidp","biometricprompt","java"],"created_at":"2024-11-07T10:35:04.555Z","updated_at":"2025-04-07T13:09:00.578Z","avatar_url":"https://github.com/anitaa1990.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Biometric-Auth-Sample\nAdd Biometric Authentication to any Android app\u003c/br\u003e\n\nThis library provides an easy way to implement fingerprint authentication without having to deal with all the boilerplate stuff going on inside.\n\n\u003cimg src=\"https://img.shields.io/badge/API-23%2B-blue.svg?style=flat\" style=\"max-width:100%;\" alt=\"API\" data-canonical-src=\"https://img.shields.io/badge/API-23%2B-blue.svg?style=flat\" style=\"max-width:100%;\"\u003e\n\n\n\u003cp\u003e\u003ca href=\"https://github.com/anitaa1990/Biometric-Auth-Sample/blob/master/media/1.png\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/anitaa1990/Biometric-Auth-Sample/blob/master/media/1.png\" width=\"250\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003c/br\u003e\u003c/br\u003e\u003c/br\u003e\n\n\n\n\u003ch2\u003eHow to integrate the library in your app?\u003c/h2\u003e\n\u003cb\u003eGradle Dependecy\u003c/b\u003e\u003c/br\u003e\n\n```gradle\ndependencies {\n        implementation(group: 'com.an.biometric', name: 'biometric-auth', version: '0.1.0', ext: 'aar', classifier: '')\n}\n```\n\n\u003ch2\u003eUsage\u003c/h2\u003e\n\n```\nnew BiometricManager.BiometricBuilder(MainActivity.this)\n                        .setTitle(\"Add a title\")\n                        .setSubtitle(\"Add a subtitle\")\n                        .setDescription(\"Add a description\")\n                        .setNegativeButtonText(\"Add a cancel button\")\n                        .build()\n                        .authenticate(biometricCallback);\n```\n\nThe ```BiometricCallback``` class has the following callback methods:\n\n```\nnew BiometricCallback() {\n              @Override\n              public void onSdkVersionNotSupported() {\n                     /*  \n                      *  Will be called if the device sdk version does not support Biometric authentication\n                      */\n               }\n\n               @Override\n               public void onBiometricAuthenticationNotSupported() {\n                     /*  \n                      *  Will be called if the device does not contain any fingerprint sensors \n                      */\n               }\n\n               @Override\n               public void onBiometricAuthenticationNotAvailable() {\n                    /*  \n                     *  The device does not have any biometrics registered in the device.\n                     */\n               }\n\n               @Override\n               public void onBiometricAuthenticationPermissionNotGranted() {\n                      /*  \n                       *  android.permission.USE_BIOMETRIC permission is not granted to the app\n                       */\n               }\n\n               @Override\n               public void onBiometricAuthenticationInternalError(String error) {\n                     /*  \n                      *  This method is called if one of the fields such as the title, subtitle, \n                      * description or the negative button text is empty\n                      */\n               }\n\n               @Override\n               public void onAuthenticationFailed() {\n                      /*  \n                       * When the fingerprint doesn’t match with any of the fingerprints registered on the device, \n                       * then this callback will be triggered.\n                       */\n               }\n\n               @Override\n               public void onAuthenticationCancelled() {\n                       /*  \n                        * The authentication is cancelled by the user. \n                        */\n               }\n\n               @Override\n               public void onAuthenticationSuccessful() {\n                        /*  \n                         * When the fingerprint is has been successfully matched with one of the fingerprints   \n                         * registered on the device, then this callback will be triggered. \n                         */\n               }\n\n               @Override\n               public void onAuthenticationHelp(int helpCode, CharSequence helpString) {\n                         /*  \n                          * This method is called when a non-fatal error has occurred during the authentication \n                          * process. The callback will be provided with an help code to identify the cause of the \n                          * error, along with a help message.\n                          */\n                }\n\n                @Override\n                public void onAuthenticationError(int errorCode, CharSequence errString) {\n                         /*  \n                          * When an unrecoverable error has been encountered and the authentication process has \n                          * completed without success, then this callback will be triggered. The callback is provided \n                          * with an error code to identify the cause of the error, along with the error message. \n                          */\n                 }\n              });\n\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanitaa1990%2Fbiometric-auth-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanitaa1990%2Fbiometric-auth-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanitaa1990%2Fbiometric-auth-sample/lists"}