Biometric-Auth-Sample | Add Biometric Authentication to any Android app | Android library
kandi X-RAY | Biometric-Auth-Sample Summary
kandi X-RAY | Biometric-Auth-Sample Summary
Add Biometric Authentication to any Android app
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initializes the biometric manager
- Initializes the cipher
- Display biometric prompt
- Authenticates the dialog
- Cancel authentication
- Check if biometric prompt enabled
- Sets up dialog view
- Update the logo
- On authentication failed
- Override if authentication help is enabled
- Handle authentication success
- Notification callback method
- Override this method to set the authentication error code
- Display an error in the application
- This method is called when the biometric authentication is not available
- Displays the biometric authentication not supported
- Displays an error message
- Display a toast with the SDK version not supported
Biometric-Auth-Sample Key Features
Biometric-Auth-Sample Examples and Code Snippets
Community Discussions
Trending Discussions on Biometric-Auth-Sample
QUESTION
I am using the new BiometricPrompt
API in Android P (API 28) in my application. (I am actually using it inside a wrapper based on this project so that it functions on older devices too, but that is not relevant to the question.) This is working very well on all devices I have tested, except for the Samsung S9 with face unlock.
Even though the stock Android version of BiometricPrompt
currently only implements fingerprint authentication, Samsung appears to have extended it to support Face Unlock as well. When I trigger biometric authentication in my app, the "bottom sheet" pops up with a face icon (instead of the fingerprint icon shown on all other devices) and at the top of the screen some text appears that says "no face detected". (Note that the icon shown here is provided by the operating system, not by me, so it is obviously of Samsung's design.)
According to the documentation, the BiometricPrompt
is only supposed to close itself and call my onAuthenticationSucceeded
method if the authentication has been successful. According to logcat
, it looks like it has been successful:
ANSWER
Answered 2019-Oct-09 at 20:33I had this same issue when attempting to use the BiometricPrompt APIs to authenticate users into my app. I reached out to Samsung technical support and they confirmed that Samsungs face recognition is not secure enough to unlock the Android Keystore.
This makes sense since the current Samsung Galaxy devices (S8, S9, S10) do not have the necessary hardware to do 3D imaging of a face (rumor has it that the Pixel 4 will). This reminds me of Samsungs first fingerprint implementation, on the S5 I believe, that did not meet Google's technical specifications and didn't work after upgrading to Marshmallow.
Below is the actual reply that I received from Samsung tech support:
For security reasons, Face Biometric can not update the keystore after authentication. So, SecurityException is shown when the application tries to make a keystore or sign by the keystore.
Currently, you can not use Face Biometric in your application to authenticate. Alternatively, you may guide the user to change Preferred Biometric to Fingerprint / Iris by showing a pop up (to open biometric preference setting) while getting these exceptions.
Thank you for your patience.
Curiously, I no longer see the crash on the Galaxy S10. The authentication just returns an error code. This may be even worse since it breaks their suggested fix. Ugh.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Biometric-Auth-Sample
You can use Biometric-Auth-Sample like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Biometric-Auth-Sample component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page