Caused by java.lang.RuntimeException: Object should first be initialized (JavaObject).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4j.object.JavaObject.getCurrentClass(JavaObject.java:258)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:118)
Public Sub getHardwareDetected As Boolean
If sensor.IsInitialized Then
Return sensor.RunMethod("isHardwareDetected", Null)
Else
Return False
End If
End Sub
I actually have a friend with a smartphone with fingerprint sensor, running android 5, and this class works great. Perhaps they give users a 'fix'.
Furthermore, I wouldn't want to use phone lib, some users find it sensitive, so for now, I'll just stack with the above workaround.
Thank you very much, Don, I always find your answers helpful.
I see! Then, this is great and Don's suggestion will be followed!
But then, I miss some older devices which to my surprise react well to the fingreprint class
I know but I've seen it with my own eyes earlier today! Tomorrow I'm going to check what really goes on with my friend's phone, perhaps you're absolutely right!
It's a Xiaomi device, see the attached screenshot. Everything works great. I'm pretty sure it received a patch for this.
However, I keep receiving random errors from devices running below api 23, so I guess I will follow your advice and remove support for these older devices.