incendio Well-Known Member Licensed User Longtime User Jun 27, 2018 #1 Hello, I tried fingerprint library from https://www.b4x.com/android/forum/threads/fingerprint-authentication.72500/ with real device on Oreo 8.0. Changed a code for sub Auth_Complete to be like this Code: Sub Auth_Complete (Success As Boolean, ErrorMessage As String) If Success Then ToastMessageShow("You have been authenticated!!!", True) Else fingerprint.Cancel ToastMessageShow($"Error: ${ErrorMessage}"$, True) Log(ErrorMessage) End If End Sub If scan succeded, the app worked OK, message "You have been authenticated!!!" appeared, but if scan failed, fingerprint cancel and the error message never called. Any idea why it didn't work as expected?
Hello, I tried fingerprint library from https://www.b4x.com/android/forum/threads/fingerprint-authentication.72500/ with real device on Oreo 8.0. Changed a code for sub Auth_Complete to be like this Code: Sub Auth_Complete (Success As Boolean, ErrorMessage As String) If Success Then ToastMessageShow("You have been authenticated!!!", True) Else fingerprint.Cancel ToastMessageShow($"Error: ${ErrorMessage}"$, True) Log(ErrorMessage) End If End Sub If scan succeded, the app worked OK, message "You have been authenticated!!!" appeared, but if scan failed, fingerprint cancel and the error message never called. Any idea why it didn't work as expected?
derez Expert Licensed User Longtime User Jun 27, 2018 #2 try to cancel the object after the messages... Upvote 0
incendio Well-Known Member Licensed User Longtime User Jun 27, 2018 #3 derez said: try to cancel the object after the messages... Click to expand... No Avail. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 27, 2018 #4 Do you see a "fail" message in the logs? Upvote 0
incendio Well-Known Member Licensed User Longtime User Jun 27, 2018 #5 Erel said: Do you see a "fail" message in the logs? Click to expand... Sorry, tested on real device, don't know how to see a log in real device. Upvote 0
Erel said: Do you see a "fail" message in the logs? Click to expand... Sorry, tested on real device, don't know how to see a log in real device.
incendio Well-Known Member Licensed User Longtime User Jun 28, 2018 #6 I changed Sub Auth_Complete in FingerPrintManager.bas to like this Code: Private Sub Auth_Complete (Success As Boolean, ErrorCode As Int, ErrorMessage As String) ToastMessageShow("Fingerprint Completed.", True) If ErrorCode = 5 Then Return 'cancel CallSub3(mTarget, mEventName & "_complete", Success, ErrorMessage) End Sub If FingerPrint scan successded, message "Fingerprint Completed." showed, but if FingerPrint scan failed, this message didn't show. I guest a failed scan is not considered as a complete event so this event is never triggered. Upvote 0
I changed Sub Auth_Complete in FingerPrintManager.bas to like this Code: Private Sub Auth_Complete (Success As Boolean, ErrorCode As Int, ErrorMessage As String) ToastMessageShow("Fingerprint Completed.", True) If ErrorCode = 5 Then Return 'cancel CallSub3(mTarget, mEventName & "_complete", Success, ErrorMessage) End Sub If FingerPrint scan successded, message "Fingerprint Completed." showed, but if FingerPrint scan failed, this message didn't show. I guest a failed scan is not considered as a complete event so this event is never triggered.
Erel B4X founder Staff member Licensed User Longtime User Jun 28, 2018 #7 incendio said: Sorry, tested on real device, don't know how to see a log in real device. Click to expand... You must be able to read the logs. Connect with B4A-Bridge and run your app in debug mode. Or in release mode with #BridgeLogger: True. Upvote 0
incendio said: Sorry, tested on real device, don't know how to see a log in real device. Click to expand... You must be able to read the logs. Connect with B4A-Bridge and run your app in debug mode. Or in release mode with #BridgeLogger: True.
incendio Well-Known Member Licensed User Longtime User Jun 28, 2018 #8 Erel said: You must be able to read the logs. Connect with B4A-Bridge and run your app in debug mode. Or in release mode with #BridgeLogger: True. Click to expand... See my post #6, I don't think there is any log caused Sub Auth_Complete in FingerPrintManager.bas never triggered on a failed scan. Upvote 0
Erel said: You must be able to read the logs. Connect with B4A-Bridge and run your app in debug mode. Or in release mode with #BridgeLogger: True. Click to expand... See my post #6, I don't think there is any log caused Sub Auth_Complete in FingerPrintManager.bas never triggered on a failed scan.