Hi all,
I'm implementing Erel's BARCODE READER into my app and the added feature is running without error.
But when I tap the START button, all I get is a black rectangle with no camera picture. I then tap the button again (STOP) and the rectangle (Panel) disappears as expected.
I put a debug on some of the code to step thru the code, and the camera picture appeared. Hovering over the barcode, the code "captured" the barcode as expected.
Initially, I downloaded the demo app and ran it without error and it ran as expected, with none of the above issues, it works perfectly.
My device (Samsung 23Plus) has 3 back cameras and the code reports 3 cameras in my app and the demo app.
Here are the Log results from my app:
So I need to figure out why the camera picture does not appear while running it.
Any help on this would be appreciated.
BTW... I did copy the #AdditionalJar to the Main and copied in the Manifest additions as well.
UPDATE #1: after running the app in debug mode and stepping thru the code, I see the camera picture starts/appears with the following CameraExClass function:
So now why doesn't the camera picture start without stepping thru the code?
UPDATE #2: added a Sleep(100) as follows and now the camera picture appears as expected and the code reads the barcode as expected.
Regards,
Mark Stuart
I'm implementing Erel's BARCODE READER into my app and the added feature is running without error.
But when I tap the START button, all I get is a black rectangle with no camera picture. I then tap the button again (STOP) and the rectangle (Panel) disappears as expected.
I put a debug on some of the code to step thru the code, and the camera picture appeared. Hovering over the barcode, the code "captured" the barcode as expected.
Initially, I downloaded the demo app and ran it without error and it ran as expected, with none of the above issues, it works perfectly.
My device (Samsung 23Plus) has 3 back cameras and the code reports 3 cameras in my app and the demo app.
Here are the Log results from my app:
B4X:
findCamera
null
3
facing: 0, 0
findCamera
0
3
facing: 0, 0
Preview Orientation: 90
Camera Success
** Activity (scanitems) Pause, UserClosed = true **
** Activity (select_zone) Resume **
So I need to figure out why the camera picture does not appear while running it.
Any help on this would be appreciated.
BTW... I did copy the #AdditionalJar to the Main and copied in the Manifest additions as well.
UPDATE #1: after running the app in debug mode and stepping thru the code, I see the camera picture starts/appears with the following CameraExClass function:
B4X:
Public Sub StartPreview
cam.StartPreview '<--- right here
End Sub
UPDATE #2: added a Sleep(100) as follows and now the camera picture appears as expected and the code reads the barcode as expected.
B4X:
Public Sub StartPreview
Sleep(100) '<--- added this seems to work on the Samsung S23Plus device
cam.StartPreview
End Sub
Regards,
Mark Stuart
Last edited: