Hi @Erel, I know we're not supposed to direct our questions directly to you, but i really think that since you wrote this library I may have a better chance at getting a straight answer from you, I am currently working on creating an App at work to test some custom made Cameras by Qualcom company, i am in need of having access to the onImageAvailable Event, I went through your library and I see that you have an Event that is supposed to be raised depending on the ImageFormat, below is the code taken from your Camera2 Library:
Code deleted due to inappropriately posting it without Consent.
My question is, I tried setting the following Sub to different values including 35 in the PreviewFormat parameter to see If I can raise the PreviewTaken Event without any success, For the Value = 35 it seems to work but when I take a picture i get the following error:
Any advice you can give me on how to accomplish what i'm trying to do here?
Thanks,
Walter
Code deleted due to inappropriately posting it without Consent.
My question is, I tried setting the following Sub to different values including 35 in the PreviewFormat parameter to see If I can raise the PreviewTaken Event without any success, For the Value = 35 it seems to work but when I take a picture i get the following error:
For any other value except 256 I keep getting an error saying that whatever previewformat i pass to the function is not supported, which brings me to my next question, I have posted this next question on this thread, about getting the supported preview formats.*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
LEVEL_3
** Activity (main) Resume **
Start success: true
Error occurred on line: 323 (CamEx2)
java.lang.ClassCastException: android.media.ImageReader$SurfaceImage cannot be cast to byte[]
at b4a.example3.camex2$ResumableSub_TakePictureNow.resume(camex2.java:1823)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:735)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:357)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:245)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA$1.run(BA.java:330)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7032)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
** Activity (main) Pause, UserClosed = true **
Any advice you can give me on how to accomplish what i'm trying to do here?
Thanks,
Walter
Last edited: