Hello
I'm using BarcodeCamera and I get this error in a tablet with android 4.4.2.
the same app has no problems with android 8 (other versions I could not try)
if I remember correctly cameraexclass worked from version 2.2 of android.
com.google.android.gms: play-services-vision has a minimum version ?
Thanks
B4X:
** Activity (main) Resume **
Is detector operational: true
findCamera
null
2
facing: 0, 0
findCamera
3
2
facing: 0, 0
90
cameraexclass_commitparameters (java line: 215)
java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:1753)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.agraham.reflection.Reflection.runmethod(Reflection.java:216)
at anywheresoftware.b4a.agraham.reflection.Reflection.RunMethod4(Reflection.java:857)
Sub Camera1_Ready (Success As Boolean)
If Success Then
camEx.SetJpegQuality(90)
camEx.SetFocusMode("continuous-picture")
camEx.CommitParameters
camEx.StartPreview
Log(camEx.GetPreviewSize)
Else
ToastMessageShow("Cannot open camera.", True)
End
in CameraExClass :
B4X:
Public Sub CommitParameters
'Try
r.target = nativeCam
r.RunMethod4("setParameters", Array As Object(parameters), Array As String("android.hardware.Camera$Parameters"))
'Catch
' ToastMessageShow("Error setting parameters.", True)
' Log(LastException)
' End Try
End Sub
I try to change these two parameters, at this point I assume that the tablet does not support one of the two ...
Thanks
I confirm, without working even if it does not focus.
I try to change the "continuous-picture" parameter.
Now I'm looking in the documentation
Thanks again.