Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fingerprint operation canceled #108

Open
adhikari-jagdish opened this issue Oct 17, 2018 · 1 comment
Open

Fingerprint operation canceled #108

adhikari-jagdish opened this issue Oct 17, 2018 · 1 comment

Comments

@adhikari-jagdish
Copy link

com.mtramin.rxfingerprint.data.FingerprintAuthenticationException: Fingerprint operation canceled.
at com.mtramin.rxfingerprint.FingerprintObservable$2.onAuthenticationError(FingerprintObservable.java:89)
at android.hardware.fingerprint.FingerprintManager$MyHandler.sendErrorResult(FingerprintManager.java:1188)
at android.hardware.fingerprint.FingerprintManager$MyHandler.handleMessage(FingerprintManager.java:1154)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
D/LoginActivity: Fingerprint operation canceled.

@vilaptev
Copy link

vilaptev commented Nov 21, 2018

com.mtramin.rxfingerprint.data.FingerprintAuthenticationException: Fingerprint operation canceled.
at com.mtramin.rxfingerprint.FingerprintObservable$2.onAuthenticationError(FingerprintObservable.java:89)
at android.hardware.fingerprint.FingerprintManager$MyHandler.sendErrorResult(FingerprintManager.java:1188)
at android.hardware.fingerprint.FingerprintManager$MyHandler.handleMessage(FingerprintManager.java:1154)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
D/LoginActivity: Fingerprint operation canceled.

@adhikari-jagdish try this approach:
Use dispose() each time when you finish your work with fingerprint.

class SomeClass {
private var subscription: Disposable? = null
fun encrypt(context: Context, fingerKey: String, pin: String) {
subscription = RxFingerprint.encrypt(context, fingerKey, pin)
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ result: FingerprintEncryptionResult ->
//TODO: add code for onNext
}, { exception: Throwable ->
//TODO: add code for onError
}, {
//TODO: add code for onComplete
})
}
fun onFinish() {
subscription?.dispose()
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants