aitorvs / fingerlock Goto Github PK
View Code? Open in Web Editor NEWAndroid fingerprint authentication library
License: MIT License
Android fingerprint authentication library
License: MIT License
This is more of a feature request in the future, but would it be possible for the out of the box dialog to be customizable to include options to change the text, text color, and icons? I was thinking something like:
FingerprintDialog.Builder()
.with(MyActivity.this)
.setKeyName(KEY_NAME)
.setRequestCode(SOME_REQUEST_CODE)
.setDialogTitle("Fingerprint Sign In")
.setDialogMessage("Use fingerprint to sign in.")
.setScanningMessage("Place finger on sensor")
.setScanningDrawable(myScanningIcon)
.setScanningMessageColor(R.color.myCustomColor)
.setAuthenticatedMessage("Success!")
.setAuthenticatedDrawable(mySuccessIcon)
.setAuthenticatedMessageColor(R.color.myCustomColor)
.setFailedMessage("Fingerprint not recognized. Try Again.")
.setFailedDrawable(myFailedIcon)
.setFailedMessageColor(R.color.myCustomColor)
.show()
I realize I could create one from scratch, but I really like the one included in the library and just want to change the icon colors and text colors :)
`
@OverRide
public boolean isFingerprintAuthSupported() {
invalidContext();
// check permissions
int granted = ContextCompat.checkSelfPermission(mContext, android.Manifest.permission.USE_FINGERPRINT);
if (granted != PackageManager.PERMISSION_GRANTED) {
// not granted
return false;
}
// return hardware support
//noinspection MissingPermission
return mFingerprintManager != null
&& mFingerprintManager.isHardwareDetected()
&& mFingerprintManager.hasEnrolledFingerprints();
}
`
Currently,
FINGERPRINT_PERMISSION_DENIED and FINGERPRINT_REGISTRATION_NEEDED will also return FINGERPRINT_NOT_SUPPORTED, which is misleading.
Can you any help to scanner my finger to result scanning to textview ?
Hi,
I tried to use this project to learn about the fingerprint in android.
After installation, the Authenticate using Fingerprint is just showing an option but not working.
Can you suggest the possible solution?
Hey, great library !!
if possible can you update the the doc with an example with a fragment, because after a little looking around in the source files of the lib the method initialize takes only an AppCompatActivity as a parameter.
After I perform afingerLockManager.start()
and I purposely scan a bad fingerprint 5 times. This makes the Google API return a FingerprintManager.FINGERPRINT_ERROR_LOCKOUT error, which states:
The operation was canceled because the API is locked out due to too many attempts.
However, when onFingerLockError()
is fired, the error type is FingerLock.FINGERPRINT_UNRECOVERABLE_ERROR
. Is this the correct behavior?
I would assume that FingerLock.FINGERPRINT_UNRECOVERABLE_ERROR
is an unknown or unrecoverable error. Does this mean it's a FingerprintManager.FINGERPRINT_ERROR_LOCKOUT
? How would I specifically handle FingerprintManager.FINGERPRINT_ERROR_LOCKOUT
error if an "unrecoverable error" could be anything?
When FingerLock is initialized after previously registered fingerprints were deleted from Android Settings produces an unexpected error. The error returned is FINGERPRINT_NOT_SUPPORTED
, when it should be FINGERPRINT_REGISTRATION_NEEDED
FingerPrintManager.start()
should work as expected with successful fingerprint scan.FingerprintManager.initalize()
onFingerLockError()
should fire with FingerLockErrorState == FINGERPRINT_REGISTRATION_NEEDED
onFingerLockError()
fires but FingerLockErrorState == FINGERPRINT_NOT_SUPPORTED
And a bunch of other devices.
Writing this here so others don't go crazy as well.
I get a call to onFingerLockScanning(true) and then attempt using the fingerprint scanner, but nothing is registered. It turns out that the system sometimes locks out the fingerprint scanner (and this locking out behavior is apparently not standardized, note that this is not the same as that "5 max attempts in whatever seconds" lock out) and apparently we have no way of detecting the lock out. The behavior seems to differ based on different manufacturer's. Everything works perfectly on the emulator, but fingerprint scanning randomly stops on seemingly random devices. Like redmi note 4.
At the very least, I'd love to have a way of knowing whether or not it'll work so I can, at the very least, fall back to other auth methods.
If anybody knows of a solution, please share :)
Hi
I tried this app on my Samsung Galaxy S5 (SM-G900F) with Android 6.0.1. This device is equipped with fingerprint scaner.
I have defined fingerprints and I use this method to unlock my lock screen.
I have tried to use other app like "Finger Security" and it's working normally.
But when I try to use this app I get this message "Fingerprint authentication not supported in this device"
What can I do to make this app work?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.