ajalt / reprint Goto Github PK
View Code? Open in Web Editor NEWA unified fingerprint library for android.
License: Apache License 2.0
A unified fingerprint library for android.
License: Apache License 2.0
Dear admin
i using device asus android 6.0 and have fingerprint and setting fingerprint in device. But when i active finger them get error
Reprint.isHardwarePresent() is false
Please help me.
Thanks ad.
im Duc
How can I add SpassReprintModule for Samsung?
thank you
I am seeing this crash on crashlytics logs report with Galaxy J7 Prime android version (8.1.0):
Fatal Exception: android.content.res.Resources$NotFoundException: String resource ID #0x7f110090 at android.content.res.Resources.getText + 354(Resources.java:354) at android.content.res.Resources.getString + 448(Resources.java:448) at android.content.Context.getString + 556(Context.java:556) at com.github.ajalt.reprint.module.marshmallow.MarshmallowReprintModule$AuthCallback.onAuthenticationFailed + 278(MarshmallowReprintModule.java:278) at android.hardware.fingerprint.FingerprintManager$MyHandler.sendAuthenticatedFailed + 1338(FingerprintManager.java:1338) at android.hardware.fingerprint.FingerprintManager$MyHandler.handleMessage + 1245(FingerprintManager.java:1245) at android.os.Handler.dispatchMessage + 106(Handler.java:106) at android.os.Looper.loop + 164(Looper.java:164) at android.app.ActivityThread.main + 7000(ActivityThread.java:7000) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 441(RuntimeInit.java:441) at com.android.internal.os.ZygoteInit.main + 1408(ZygoteInit.java:1408)
It happens here. Somehow the string R.string.fingerprint_not_recognized
is not found
On the migration of the lib to Android X core, there was a conflict of dependencies .
https://developer.android.com/reference/kotlin/androidx/core/os/CancellationSignal
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/os/CancellationSignal;
at com.github.ajalt.reprint.core.ReprintInternal.authenticate(ReprintInternal.java:95)
at com.github.ajalt.reprint.core.Reprint.authenticate(Reprint.java:109)
at com.github.ajalt.reprint.core.Reprint.authenticate(Reprint.java:90)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.os.CancellationSignal" on path: DexPathList[[zip file "/data/app/...... "],nativeLibraryDirectories=[/data/app/.....==/lib/arm, /data/app/......==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.github.ajalt.reprint.core.ReprintInternal.authenticate(ReprintInternal.java:95)
at com.github.ajalt.reprint.core.Reprint.authenticate(Reprint.java:109)
at com.github.ajalt.reprint.core.Reprint.authenticate(Reprint.java:90)
I would like to pass a CryptoObject
to the FingerprintManager and I am looking for the path of least resistance solution.
Is it better to build a brand new ReprintModule and call registerModule()
with it?
Or should I try to modify the existing MarshmallowReprintModule
Also, if I created a new ReprintModule with Crypto, will I need to modify the RxJava2 library?
Unrelated question, but I noticed that the Samsung SPass module is ignored on API 23+ devices. Is this intended?
reprint have on android under 6.0? thanks
Have a read and consider rewriting your wrapper, as it doesn't respect unsubscriptions, backpressure.
The first topic in the repo description says andriod
whereas it should be android
I get following log messages when calling Reprint.initialize(MainApp.this);
in my app class:
FingerprintManager: ensureServiceConnected: mService is null
FingerprintManager: waitForService: called
FingerprintManager: waitForService: Timeout
And whenever I want to start the fingerprint reader I get this exception as well... Any ideas why this is happening?
It's probably some software problem, because it worked before on my phone and all I changed is, that I installed a custom recovery on my phone (a Samsung Galaxy Alpha).
Still, this results in two common problem:
Reprint.initialize(MainApp.this);
is blocking the app start extremelyReprint
is blocking againSuggestions:
Reprint.initialize(MainApp.this);
should be run asnychronously and any use of the Reprint
API should block until the init function is finishedReprint.initialize(MainApp.this);
fails, further calls to use Reprint should fail instantly instead of always checking the fingerprint hardware againTurning phone off and on, and using the fingerprint, first to unlock the phone and then to unlock my app works fine.
Using it again fails every time. AuthenticationListener for the Reprint.authenticate seems like it is not listening. No messages.
Thanks for any clue.
Hi, great library. 2 Questions.
I'm getting following errors:
:app:lintVitalRelease_pro
Error processing ...\app\build\intermediates\exploded-aar\com.github.ajalt.reprint\reprint_spass\2.8.0\jars\libs\pass-v1.1.4.jar:com\samsung\android\sdk\pass\SpassFingerprint.class: broken class file?
Error processing ...\app\build\intermediates\exploded-aar\com.github.ajalt.reprint\reprint_spass\2.8.0\jars\libs\pass-v1.1.4.jar:com\samsung\android\sdk\pass\support\SdkSupporter.class: broken class file?
Error processing ...\app\build\intermediates\exploded-aar\com.github.ajalt.reprint\reprint_spass\2.8.0\jars\libs\pass-v1.1.4.jar:com\samsung\android\sdk\pass\support\v1\FingerprintManagerProxyFactory$a.class: broken class file?
Any ideas why this happens and how to solve that?
Can you expose a method that handles KeyPermanentlyInvalidatedException and return a boolean once the library detects a fingerprint change?
Reprint working perfect on Activitys.
But in Service when new AuthenticationListener starts, it work only in first time that service started and when that service killed and start again, AuthenticationListener not working, untill app re install or clear data happen.
in my Service onDestroy:
public void onDestroy() {
super.onDestroy();
Reprint.cancelAuthentication();
}
I think problem is becouse of Reprint.cancelAuthentication(); not working in service.
I test it by calling Reprint.cancelAuthentication(); inside of onFailure callback and it stop listener on first onFailure in activity but not in service.
For my app, I have LeakCanary set up and it found that an activity was leaked because a dialog I had created implemented the AuthenticationListener interface which was passed to Reprint.authenticate(). According to the LeakCanary Dump, Reprint looks to be holding onto the listener it's given which in my case kept the dialog and activity that launched it in memory.
I have created a workaround for my app, but ideally Reprint would drop its references once authentication is complete.
If it matters, I'm running a Huawei Nexus 6P with Android 6.0.1.
I'm creating a Subscription in an activities onResume() and unsubscribing in onPause(), and my onError finishes the activity and starts a new instance of the same activity. If the fingerprint fails, the activity is re-launched, causing onResume() to create a new Subscription for which onError() is called immediately. Here's the relevant reproduction of my code.
public class SecurityActivity {
Subscription sub;
@Override
protected void onResume() {
super.onResume();
sub = subscribeFingerprintScanner();
}
@Override
protected void onPause() {
super.onPause();
if (sub != null) {
sub.unsubscribe();
sub = null;
}
private Subscription subscribeFingerprintScanner() {
return RxReprint.authenticate()
.retry(RxReprint.retryNonFatal(5))
.subscribe(new Subscriber<Integer>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable throwable) {
AuthenticationFailure e = (AuthenticationFailure) throwable;
new AlertDialog.Builder(SecurityActivity.this)
.setMessage(e.errorMessage)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Intent intent = new Intent(SecurityActivity.this, SecurityActivity.class);
startActivity(intent);
finish();
}
})
.setCancelable(false)
.show();
}
@Override
public void onNext(Integer integer) {
// do something and finish()
}
});
}
v3.1.0
IllegalStateException in MarshmallowReprintModule.java:
caused by java.lang.IllegalStateException : Failed parsing settings file: /data/system/users/0/settings_fingerprint.xml
I'm using reprint on a phone with api 23 but no fingerprint sensor. onFailure gets called immediately.
It seems that retry(RxReprint.retryNonFatal(5))
doesn't work when not using retrolamda.
After the first (non-fatal) error, the fingerprint reader no longer seems to be listening for any input, and it no longer emits any errors nor codes.
I changed these lines in the sample app with the code below:
RxReprint.authenticate()
.doOnError(new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
AuthenticationFailure e = (AuthenticationFailure) throwable;
showError(e.failureReason, e.fatal, e.errorMessage, e.errorCode);
}
})
.retry(RxReprint.retryNonFatal(5))
.subscribe(new Subscriber<Integer>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(Integer integer) {
showSuccess();
}
});
Tried this on a nexus 6p (running android 7.1.1) and on an emulator with the 7.1.1. image.
However! Adding plenty of breakpoints seemed to solve the issue..
i think logger in SpassReprintModule should be null able.
The way the api is written errors come the same method as successes. It makes it difficult to write a chain of map, flatmap, debounce or other operations if you have to filter or check out errors first, and completely defeats the purposed design of going reactive.
Can you transform the library to also utilize androidx.biometric:biometric?
hi, guy
my project have min sdk is 10. And your lib is 14. I get error when build is uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library [com.github.ajalt.reprint:core:2.7.1]
Please help me. Thanks.
error processing /Users/bwicks/.gradle/caches/transforms-1/files-1.1/reprint_spass-3.2.1.aar/cefecf9272366b1595138cd6fb920b26/jars/libs/pass-v1.1.4.jar
java.lang.ArrayIndexOutOfBoundsException: 5
at org.objectweb.asm.ClassReader.readFrameType(ClassReader.java:2310)
at org.objectweb.asm.ClassReader.readFrame(ClassReader.java:2269)
at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1448)
at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1126)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:698)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyze(DesugaringClassAnalyzer.java:144)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyzeJar(DesugaringClassAnalyzer.java:92)
at com.android.builder.desugaring.DesugaringClassAnalyzer.analyze(DesugaringClassAnalyzer.java:63)
at com.android.build.gradle.internal.transforms.DesugarIncrementalTransformHelper.lambda$getInitalGraphData$4(DesugarIncrementalTransformHelper.java:150)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
There are no errors when I build with AGP 3.1.3 stable.
I am using the latest version of the library. My users are reporting that my app is no longer recognising fingerprints registered on device and sometimes not even the fingerprint hardware. Example devices - OnePlus 2 and Cubot cheetah 2. I personally tested on Android Emulator (running 7.1.1) and a Samsung J7 Prime and it worked, but not sure why it doesn't work on others.
Funny thing is, it used to work before (when using v2.5.6), but I updated the library to the latest version today in my app and it broke support for some devices.
i have migrated my project to android x
but while compiling "implementation 'com.github.ajalt.reprint:reprint_spass:3.2.1@aar'"
but core dependency working fine
i am getting this error
Unable to resolve dependency for ':app@debug/compileClasspath': Failed to transform file 'reprint_spass-3.2.1.aar' to match attributes {artifactType=processed-aar} using transform JetifyTransform
try to integrate this aar to my proj but i notice the dialogue is not appear for samsung pass devices, after dig into your codes and found out you are using startIdentify instead of startIdentifyWithDialog, any reason of this?
hi i am trying to find if in this library exits too face auth and finger print?
as i can see now there is only finger print
I'm getting failureReason = NO_HARDWARE in method onFailure(), after calling Reprint.authenticate() on a Samsung Galaxy Note 4. I have added the proper @aar declaration for Samsung Pass and fingerprint works fine in other apps. What can be wrong?
Hello,
I don't know if it's jitpack or reprint but I can't use the library with gradle 3:
implementation 'com.github.ajalt.reprint:core:3.2.1@aar'
Any help is appreciated
I read issue #4, however it gets called immediately onFailure only on some devices (in my case Meizu)? onFailure gets called with AuthenticationFailureReason SENSOR_FAILED
with error code 1001
. Is it possible to handle such cases?
I found that if I use RxReprint.authenticate().retry(RxReprint.retryNonFatal(5))
, onError() will usually be called on the 6th failure (but not always). Changing that to RxReprint.authenticate().retry(RxReprint.retryNonFatal(2))
results in the same behavior, as does RxReprint.authenticate().retry(RxReprint.retryNonFatal(1))
.
What I'm trying to go if give the user 3 tries, and tell the user on the 2nd try that if they do not succeed they will be logged out.
onSuccess the scanner doesn't work in background android service. Just works one time before onSuccess happens. How to restart the process in service?
when i delete all reprint in device, i get error "Too many attempts. Try again later."
Please change text other. Thanks
Following rules work but may be able to be improved:
-dontwarn com.samsung.**
-keep class com.samsung.** {*;}
You should add a proguard file to the project..
Hi again,
I'm getting this error when I try a not-registered finger:
java.lang.NoSuchMethodError: com.samsung.android.fingerprint.FingerprintEvent.getImageQualityFeedback
at com.samsung.android.sdk.pass.c.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5579)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
Is it possible to return some fingerprint hash or encrypt some value for external auth? onSuccess
now return only moduleTag
.
this library sometimes works Randomly but mostly it's not working on samsung devices
i have checked it on these android versions 5.1, 6.0, 7.0 on these samsung devices Galaxy S5 , S6, S7 Edge
i don't know what the issue exactly is but it should work all the time
i followed guide from the library same as its defined to integrate it
hì guy, when i remove my finger print then i get error code 1003 and STATUS LOCKED OUT and error mess is null, please help me fix, thanks.
Hello, I have tried a lot to import this to android studio and eclipse also but I am getting this error,
Error:Unable to load class 'org.gradle.internal.logging.LoggingManagerInternal'.
Possible causes for this unexpected error include:In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)- The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)- Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
Please help me,
Thank you in advance
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.