B4A Library Barcode reader based on Google Play Services Vision

Status
Not open for further replies.

Micholl

Member
Licensed User
Hello Erel,
sorry - just discovered another strange behaviour:
It seems that the result array of barcodes in Camera1_Preview always returns
all recognised barcodes - not necessary only those which are currently seen
(when I cover 1 of 3 barcodes I always get the payload of 3 barcodes back).
Should this array be new initialized from preview to preview?

Thank you, Michael
 

john1in2

Member
Licensed User
Hi, I am very new to this- I can successfully use this to read bar codes, but the image/scanning window stays on all the time. How to you exit from the image/preview panel to another screen after a successful detection?

For example after a bar code is detected, add it to a list and switch to another panel that shows the list of bar codes that you have captured, with a button which allows you back to the bar code detection preview
 
Last edited:

Juanmavalero

Member
Licensed User
Hello, the proyect sample put me this library error: Artefacto de Maven no encontrado: com.google.android.gms/play-services-vision
 

Beja

Expert
Licensed User
Hi Erel,

Back to this post.. today I tried it and I found it the same as the camera example.. it didn't raise an event or returned the detected barcode value.
am I missing something? Is it possible that you limit the example just to the barcode.. :)
Thank you

GBarcode.png
 

DonManfred

Expert
Licensed User
Is it possible that you limit the example just to the barcode.. :)
The Example is configured for
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    If FirstTime Then
        CreateDetector (Array("CODE_128", "CODE_93"))
    End If
    cvs.Initialize(pnlDrawing)
End Sub
CODE_128 and CODE_93 Barcodes. You may add other possible Values to the Array.
Check the Google Documentation for a list

Edit to Add:
RTFM In #1 is a Link: https://developers.google.com/andro...d/gms/vision/barcode/Barcode#constant-summary
 

uniplan

Active Member
Licensed User
I try it but I have:
"Is detector operational: false" and I'm not able to scan barcode.
 

uniplan

Active Member
Licensed User

Roberto P.

Well-Known Member
Licensed User
Hello to all
why this example does not work with a Samsung Tab S4 tablet?
thank you
roberto
 

Roberto P.

Well-Known Member
Licensed User
Nothing is happening. With the smartphone it reads the barcodes automatically.
 

Roberto P.

Well-Known Member
Licensed User
of course. does nothing.
It almost seems like you do not hear the camera. while, if I click the photo works.
 

Roberto P.

Well-Known Member
Licensed User
I see the video, but the event that intercepts the reading of the bar code does not start. I ran the same app on both smartphones and tablets. only difference I see is that the app asks me to confirm access to the camera the tablet no.
 
Status
Not open for further replies.
Top