There is a minimum version of the operating system to be able to use the Camera2 library?
I tried on a tablet with Android 4.1 and it gives the following error message:
Then I tried on an ASUS ZenPad tablet with Android 5.0.2 where it didn't give an error message but it didn't work either! but at line:
return Limited
On Android 9 the code works without problems.
I tried on a tablet with Android 4.1 and it gives the following error message:
B4X:
Logger connected to: samsung GT-P6800
** Activity (photo) Create, isFirst = true **
camex2_class_globals (java line: 144)
java.lang.VerifyError: anywheresoftware/b4a/objects/Camera2
at xxi.smartcityhall.camex2._class_globals(camex2.java:144)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at xxi.smartcityhall.camex2.innerInitialize(camex2.java:23)
at xxi.smartcityhall.camex2._initialize(camex2.java:710)
at xxi.smartcityhall.photo._activity_create(photo.java:390)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at xxi.smartcityhall.photo.afterFirstLayout(photo.java:105)
at xxi.smartcityhall.photo.access$000(photo.java:17)
at xxi.smartcityhall.photo$WaitForLayout.run(photo.java:83)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4947)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
--------- beginning of /dev/log/system
B4X:
Wait For(PrepareSurface) Complete (Success As Boolean)
On Android 9 the code works without problems.