[Class] CameraEx - Extends the camera library functionality
Example based on B4XPages: https://www.b4x.com/android/forum/threads/b4x-b4xpages-barcode-reader.120417/#content CameraEx class wraps the Camera object and using reflection and other code it extends its functionality. CameraEx class requires Android 2.3+ and depends on Camera library v2.20+...
Hello there,
In Erel's Camera example, I discovered a problem with the Camera example. Maybe it's a common problem, but I haven't found the necessary solution yet.
You can reveal this problem as follows.
If you upload the APK of the project at https://appetize.io/ and select "Android 8.1" and Confirm Camera Permission after opening the application, the application crashes. I could not do this on my local phones. I could not make this mistake.
But users get this error in my application on Google Play.
cameraexclass._camera_ready
B4X:
java.lang.NullPointerException:
at anywheresoftware.b4a.agraham.reflection.Reflection.runmethod (Reflection.java:205)
at anywheresoftware.b4a.agraham.reflection.Reflection.RunMethod (Reflection.java:802)
at **.cameraexclass._camera_ready (cameraexclass.java:117)
at java.lang.reflect.Method.invoke (Native Method)
at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:213)
at anywheresoftware.b4a.BA.raiseEvent (BA.java:193)
at anywheresoftware.b4a.objects.CameraW$2$1.run (CameraW.java:139)
at android.os.Handler.handleCallback (Handler.java:888)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:213)
at android.app.ActivityThread.main (ActivityThread.java:8178)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1101)
My library is up to date.
CameraExClass = version 1.30
Camera = version 2.20
The codes are the same in my own project.
I would be glad if you could help.
Attachments
Last edited: