B4A Library 1D and 2D Barcode Scanner with ZBAR - another Barcode Scanner that is 100% embedded in B4A

The attached project wraps the ZBAR part of this Github project. It looks very much the same as the project that I have posted here. Both projects use the same ViewFinder but they use different decoding engines (ZXING and ZBAR respectively).

I have not tested all the barcode formats but it should scan the following types:

BarcodeFormat.PARTIAL
BarcodeFormat.EAN8
BarcodeFormat.UPCE
BarcodeFormat.ISBN10
BarcodeFormat.UPCA
BarcodeFormat.EAN13
BarcodeFormat.ISBN13
BarcodeFormat.I25
BarcodeFormat.DATABAR
BarcodeFormat.DATABAR_EXP
BarcodeFormat.CODABAR
BarcodeFormat.CODE39
BarcodeFormat.PDF417
BarcodeFormat.QRCODE
BarcodeFormat.CODE93
BarcodeFormat.CODE128

There seems to be an issue with the scanning of PDF417 codes. I have emailed the author of the Github project (Dushyanth Maguluru) and brought it to his attention. Will update and post new library files once the issue with PDF417 codes has been resolved.

EDIT 26 Feb 2016: See this post as far as scanning of PDF417 is concerned
https://sourceforge.net/p/zbar/support-requests/76/

Please take note of the xml files in the /Objects/res/layout and Objects/res/values folders of the B4A project should you start a new project from scratch.

Posting the following:
1. B4A project demonstrating the Barcode Scanner using the ZBAR decoder
2. Library files - you need to download them from this link (too big to upload to this post) - unzip them and copy them to your additional library folder



1.png


Sample code:

B4X:
#Region  Project Attributes
    #ApplicationLabel: ZbarBarcodeScanner
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: landscape
    #CanInstallToExternalStorage: False

#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private zb1 As ZbarBarcodeScanner
    Private b1 As Button
    Private b2 As Button
    Private b3 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("main")

    zb1.LaserColor = Colors.Yellow
    zb1.MaskColor = Colors.ARGB(150, 0, 0, 200)
    zb1.BorderColor = Colors.Magenta
    zb1.BorderStrokeWidth = 5
    zb1.BorderLineLength = 40
    zb1.Visible = False

End Sub

Sub Activity_Resume

'   zb1.startScanner

End Sub

Sub Activity_Pause (UserClosed As Boolean)

    zb1.stopScanner
    zb1.Visible = False

End Sub

Sub b1_Click

    zb1.toggleFlash

End Sub

Sub b2_Click
    zb1.Visible = True
    zb1.startScanner

End Sub

Sub b3_Click
    zb1.Visible = False
    zb1.stopScanner

End Sub



Sub zb1_scan_result(scantext As String, scanformat As String)

    Log("B4A scantext = " & scantext)
    Log("B4A scanformat = " & scanformat)

End Sub


The library:

ZbarBarcodeScanner
Author:
Github: Dushyanth Maguluru, Wrapped by: Johan Schoeman
Version: 1
  • ZbarBarcodeScanner
    Events:
    • scan_result (scantext As String, scanformat As String)
    Fields:
    • ba As BA
    Methods:
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • handleResult (rawResult As Result)
    • startScanner
    • stopScanner
    • toggleFlash
    Permissions:
    • android.permission.CAMERA
    • android.permission.FLASHLIGHT
    Properties:
    • Background As Drawable
    • BorderColor As Int [write only]
    • BorderLineLength As Int [write only]
    • BorderStrokeWidth As Int [write only]
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • LaserColor As Int [write only]
    • Left As Int
    • MaskColor As Int [write only]
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int



You can use it in portrait mode and landscape mode by changing the B4A project's attribute and the code in the Designer:
#SupportedOrientations: portrait
 

Attachments

  • b4aZbarBarcodeScanner.zip
    9.9 KB · Views: 2,692
Last edited:

Zlgo

Member
See if this starts the scanner. I have replaced your Main Activity with my original Main Activity code, have removed some views from your B4A layout, and commented out just about everything in your code modules. Have also replaced your b4a manifest entries. The scanner starts......

I would suggest you start adding additional stuff bit by bit and test every step after adding additional code to make sure you can trap when and where it goes skew.

View attachment 80986
Hi Johan
I had try your previous project https://www.b4x.com/android/forum/t...feb-2016-new-library-files-in-post-105.60155/
and find out that can't read PDF417codes (I know that you made wrapping), so I try this version with Zbar, but only what working on my LG M160 is this last example. All
previous version got some problems that want open camera or crashing. What is important that quality of reading simple short code not exceeds ZXING and because small viewer frame larger codes don't read like almost every PDF417 don't fit in frame, so if there some improvements or is problem with my LG?
 

Johan Schoeman

Expert
Licensed User
Longtime User
Please see this from post #1 of this thread

EDIT 26 Feb 2016: See this post as far as scanning of PDF417 is concerned
https://sourceforge.net/p/zbar/support-requests/76/

At the time of doing the wrapper for ZBAR it did not support PDF417 codes.

If you are targeting SDK 28 in the B4A manifest then you will have to add runtime permissions to the B4A project. Please zip and upload a sample project that does not work for you so that I can take a look at it.
 

Flav78

Member
Licensed User
Good morning, i'm using zbarcode reader and i'm having trouble reading 1d barcode.

It seems it can't get correct focus in all light conditions and the images received seems not good. I don't think is a camera problem, i'm testing it on huawei p30 phone.

Is there any settings to get better results?

thanks
 

Johan Schoeman

Expert
Licensed User
Longtime User
....the images received seems not good....
I am running it on a Samsung SM-G973F and it has no problem to read 1D barcodes. It is easily reading the barcodes from my laptop's screen with a back light on or off. Do you have a specific barcode (type) that gives you a problem? Can you please clarify "the images received seems not good". Where are the images that you are referring to?

B4X:
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = Hello NDC reader!
B4A scanformat = QRCODE
B4A scantext = Hello NDC reader!
B4A scanformat = QRCODE
B4A scantext = 2228345533887
B4A scanformat = EAN13
B4A scantext = 0112590539660424
B4A scanformat = DATABAR
B4A scantext = 2112345678900
B4A scanformat = EAN13
B4A scantext = 2112345678900
B4A scanformat = EAN13
B4A scantext = 2112345678900
B4A scanformat = EAN13
B4A scantext = 2112345678900
B4A scanformat = EAN13
B4A scantext = 012345678905
B4A scanformat = UPCA
B4A scantext = 012345678905
B4A scanformat = UPCA
B4A scantext = 012345678905
B4A scanformat = UPCA
B4A scantext = 959955450
B4A scanformat = CODE128
B4A scantext = L-Tron Corp.
B4A scanformat = CODE128
B4A scantext = L-Tron Corp.
B4A scanformat = CODE128
B4A scantext = L-Tron Corp.
B4A scanformat = CODE128
B4A scantext = L-Tron Corp.
B4A scanformat = CODE128
B4A scantext = 5060034481461
B4A scanformat = EAN13
B4A scantext = 0120012345678909
B4A scanformat = DATABAR
B4A scantext = 0120012345678909
B4A scanformat = DATABAR
B4A scantext = 0120012345678909
B4A scanformat = DATABAR
B4A scantext = 5060034481461
B4A scanformat = EAN13
B4A scantext = 0120012345678909
B4A scanformat = DATABAR
B4A scantext = 0103741752225699
B4A scanformat = DATABAR
B4A scantext = 1875820020519
B4A scanformat = EAN13
B4A scantext = 09210109
B4A scanformat = UPCE
B4A scantext = 0194221253392233
B4A scanformat = DATABAR
B4A scantext = 90536083
B4A scanformat = EAN8
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = Syncfusion
B4A scanformat = CODE128
B4A scantext = Syncfusion
B4A scanformat = CODE128
B4A scantext = Syncfusion
B4A scanformat = CODE128
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = 0136938893778544
B4A scanformat = DATABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 0108207222477548
B4A scanformat = DATABAR
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = 0135523498193918
B4A scanformat = DATABAR
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = false **
focusMode front = auto
frontCamId = 1
focusMode back = auto
backCamId = 0
** Activity (main) Resume **
trying to start scanner
IN setAutoFocus
IN setAutoFocus
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = P
B4A scanformat = CODE39
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 530003
B4A scanformat = I25
B4A scantext = 0105323171575241
B4A scanformat = DATABAR
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 530003
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1101530003
B4A scanformat = I25
B4A scantext = 1101530003
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 0950110153
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 0113936152121505
B4A scanformat = DATABAR
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 444395
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = false **
focusMode front = auto
frontCamId = 1
focusMode back = auto
backCamId = 0
** Activity (main) Resume **
trying to start scanner
IN setAutoFocus
IN setAutoFocus
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
** Activity (main) Pause, UserClosed = true **

1586608431659.png
 

Flav78

Member
Licensed User
I am running it on a Samsung SM-G973F and it has no problem to read 1D barcodes. It is easily reading the barcodes from my laptop's screen with a back light on or off. Do you have a specific barcode (type) that gives you a problem? Can you please clarify "the images received seems not good". Where are the images that you are referring to?

B4X:
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = Hello NDC reader!
B4A scanformat = QRCODE
B4A scantext = Hello NDC reader!
B4A scanformat = QRCODE
B4A scantext = 2228345533887
B4A scanformat = EAN13
B4A scantext = 0112590539660424
B4A scanformat = DATABAR
B4A scantext = 2112345678900
B4A scanformat = EAN13
B4A scantext = 2112345678900
B4A scanformat = EAN13
B4A scantext = 2112345678900
B4A scanformat = EAN13
B4A scantext = 2112345678900
B4A scanformat = EAN13
B4A scantext = 012345678905
B4A scanformat = UPCA
B4A scantext = 012345678905
B4A scanformat = UPCA
B4A scantext = 012345678905
B4A scanformat = UPCA
B4A scantext = 959955450
B4A scanformat = CODE128
B4A scantext = L-Tron Corp.
B4A scanformat = CODE128
B4A scantext = L-Tron Corp.
B4A scanformat = CODE128
B4A scantext = L-Tron Corp.
B4A scanformat = CODE128
B4A scantext = L-Tron Corp.
B4A scanformat = CODE128
B4A scantext = 5060034481461
B4A scanformat = EAN13
B4A scantext = 0120012345678909
B4A scanformat = DATABAR
B4A scantext = 0120012345678909
B4A scanformat = DATABAR
B4A scantext = 0120012345678909
B4A scanformat = DATABAR
B4A scantext = 5060034481461
B4A scanformat = EAN13
B4A scantext = 0120012345678909
B4A scanformat = DATABAR
B4A scantext = 0103741752225699
B4A scanformat = DATABAR
B4A scantext = 1875820020519
B4A scanformat = EAN13
B4A scantext = 09210109
B4A scanformat = UPCE
B4A scantext = 0194221253392233
B4A scanformat = DATABAR
B4A scantext = 90536083
B4A scanformat = EAN8
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = 123456
B4A scanformat = CODE128
B4A scantext = Syncfusion
B4A scanformat = CODE128
B4A scantext = Syncfusion
B4A scanformat = CODE128
B4A scantext = Syncfusion
B4A scanformat = CODE128
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = CODE39
B4A scanformat = CODE39
B4A scantext = 0136938893778544
B4A scanformat = DATABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 0108207222477548
B4A scanformat = DATABAR
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = 12345678
B4A scanformat = QRCODE
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = A1234567890A
B4A scanformat = CODABAR
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
B4A scantext = 0135523498193918
B4A scanformat = DATABAR
B4A scantext = http://gizmodo.com
B4A scanformat = QRCODE
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = false **
focusMode front = auto
frontCamId = 1
focusMode back = auto
backCamId = 0
** Activity (main) Resume **
trying to start scanner
IN setAutoFocus
IN setAutoFocus
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = P
B4A scanformat = CODE39
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 530003
B4A scanformat = I25
B4A scantext = 0105323171575241
B4A scanformat = DATABAR
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 530003
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1101530003
B4A scanformat = I25
B4A scantext = 1101530003
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 0950110153
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 121016801952
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 0113936152121505
B4A scanformat = DATABAR
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 01234565
B4A scanformat = UPCE
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 12345670
B4A scanformat = I25
B4A scantext = 444395
B4A scanformat = I25
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 036000291452
B4A scanformat = UPCA
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 09501101530003
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
B4A scantext = 1234567895
B4A scanformat = I25
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = false **
focusMode front = auto
frontCamId = 1
focusMode back = auto
backCamId = 0
** Activity (main) Resume **
trying to start scanner
IN setAutoFocus
IN setAutoFocus
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 01345678901234515171231
B4A scanformat = CODE128
B4A scantext = 051111407592
B4A scanformat = UPCA
B4A scantext = 051111407592
B4A scanformat = UPCA
** Activity (main) Pause, UserClosed = true **

View attachment 91601
I ve done some trial. It seems the problem is happening when i try to use the scanner in portrait mode. I have setted it for best usage. When using scanner in portait it does'nt seems to be able to read anything, when in landscape mode it works fine.

The scanner works only in landscape mode?
 

Johan Schoeman

Expert
Licensed User
Longtime User
I ve done some trial. It seems the problem is happening when i try to use the scanner in portrait mode. I have setted it for best usage. When using scanner in portait it does'nt seems to be able to read anything, when in landscape mode it works fine.

The scanner works only in landscape mode?
Change the B4A manifest to this:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
'AddManifestText(
'<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="14"/>
'<supports-screens android:largeScreens="true"
'    android:normalScreens="true"
'    android:smallScreens="true"
'    android:anyDensity="true"/>)
'SetApplicationAttribute(android:icon, "@drawable/icon")
'SetApplicationAttribute(android:label, "$LABEL$")
'SetApplicationAttribute(android:theme, "@android:style/Theme.Holo")
'End of default text.


'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:screenOrientation="portrait"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
'AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.flash" android:required="false" />)
'AddPermission("android.permission.ACCESS_COARSE_LOCATION")
'AddPermission("android.permission.INTERNET")
'AddPermission("android.permission.ACCESS_FINE_LOCATION")
'AddPermission("android.permission.WAKE_LOCK")
'AddPermission("android.permission.DEVICE_POWER")
'AddPermission("android.permission.ACCESS_COARSE_UPDATES")
'AddPermission("android.permission.READ_PHONE_STATE")
'AddPermission("android.permission.VIBRATE")
AddPermission("android.permission.CAMERA")
AddPermission("android.permission.FLASHLIGHT")
'AddPermission("android.hardware.camera")
'AddPermission("android.permission.INTERACT_ACROSS_USERS_FULL")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")

'AddApplicationText(<activity android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden"
'            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
'            android:windowSoftInputMode="stateAlwaysHidden">
'        </activity>)

Set portrait mode in the B4A project:
B4X:
#Region  Project Attributes
    #ApplicationLabel: ZbarBarcodeScanner
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False

#End Region
2.png



B4X:
B4A scantext = Hello :)
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = Hello :)
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = https://play.google.com/store/apps/details?id=com.Allied.AIG
B4A scanformat = QRCODE
B4A scantext = https://play.google.com/store/apps/details?id=com.Allied.AIG
B4A scanformat = QRCODE
B4A scantext = https://play.google.com/store/apps/details?id=com.Allied.AIG
B4A scanformat = QRCODE
B4A scantext = Hello :)
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = https://play.google.com/store/apps/details?id=com.Allied.AIG
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = Hello :)
B4A scanformat = QRCODE
B4A scantext = https://play.google.com/store/apps/details?id=com.Allied.AIG
B4A scanformat = QRCODE
B4A scantext = Hello :)
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = https://play.google.com/store/apps/details?id=com.Allied.AIG
B4A scanformat = QRCODE
B4A scantext = @ELTOROIT
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
B4A scantext = http://en.m.wikipedia.org
B4A scanformat = QRCODE
** Activity (main) Pause, UserClosed = true **
 

Flav78

Member
Licensed User
Done, but the problem still persist.
Images are blurry and the lines seems overlyiing

No problem i'll use it in landscape mode.
test2.jpg
 

vecino

Well-Known Member
Licensed User
Longtime User
Hi, I am testing this library and it was working fine. But I have updated to the latest version of the library and now the app always stops on the line:
frontCamId = zb1.FrontFacingCamera
Why can it happen?
Thank you.
main$ResumableSub_Activity_Createresume (java line: 430)
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.<init>(Camera.java:532)
at android.hardware.Camera.open(Camera.java:361)
at zbarbarcodescannerwrapper.zbarBarcodeScannerWrapper.getBackFacingCamera(zbarBarcodeScannerWrapper.java:362)
at JHS.ZbarBarcodeScanner.main$ResumableSub_Activity_Create.resume(main.java:430)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:207)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at anywheresoftware.b4a.BA.setActivityPaused(BA.java:459)
at JHS.ZbarBarcodeScanner.main$ResumeMessage.run(main.java:313)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
 

incendio

Well-Known Member
Licensed User
Longtime User
Done, but the problem still persist.
Images are blurry and the lines seems overlyiing

No problem i'll use it in landscape mode.View attachment 91635
Same Problem here, using Honor 10 in portrait mode.
Have upgraded it to the latest library in post 1.

I remebered, on Honor 9 Lite, it was OK.
 
Last edited:

techgreyeye

Member
Licensed User
Longtime User

Hi Johan,

I've been playing around with this as an alternative to our software which runs on dedicated scanners. Is there any way of limiting the scan area to the central portion of the image? If I have multiple barcodes visible, it's sometimes picking one outside the viewport. Also, on my phone it can take a little while to focus, which I think would be improved if the focus distance started as close as possible. I don't know if this sort of control is possible but If it is would make this much more usable.

Great work 👍
 
Last edited:

Schakalaka

Active Member
Licensed User
Hello @Johan Schoeman,
I have this problem:
If I set a breack point on "zb1.startScanner(0)", it works correct, else, it return this error when i start the scanner




B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
focusMode front = fixed
frontCamId = 1
focusMode back = auto
backCamId = 0
** Activity (main) Resume **
trying to start scanner
IN setAutoFocus
android.content.res.Resources$NotFoundException: Resource ID #0x0
    at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:279)
    at android.content.res.Resources.getValue(Resources.java:1466)
    at android.content.res.HwResources.getColor(HwResources.java:313)
    at android.content.res.Resources.getColor(Resources.java:1076)
    at me.dm7.barcodescanner.core.ViewFinderView.<init>(ViewFinderView.java:39)
    at me.dm7.barcodescanner.core.BarcodeScannerView.createViewFinderView(BarcodeScannerView.java:62)
    at me.dm7.barcodescanner.core.BarcodeScannerView.setupLayout(BarcodeScannerView.java:43)
    at me.dm7.barcodescanner.core.BarcodeScannerView.setupCameraPreview(BarcodeScannerView.java:81)
    at me.dm7.barcodescanner.core.CameraHandlerThread$1$1.run(CameraHandlerThread.java:31)
    at android.os.Handler.handleCallback(Handler.java:808)
    at android.os.Handler.dispatchMessage(Handler.java:101)
    at android.os.Looper.loop(Looper.java:166)
    at android.app.ActivityThread.main(ActivityThread.java:7529)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)



Thank
 

Johan Schoeman

Expert
Licensed User
Longtime User
Hello @Johan Schoeman,
I have this problem:
If I set a breack point on "zb1.startScanner(0)", it works correct, else, it return this error when i start the scanner




B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
focusMode front = fixed
frontCamId = 1
focusMode back = auto
backCamId = 0
** Activity (main) Resume **
trying to start scanner
IN setAutoFocus
android.content.res.Resources$NotFoundException: Resource ID #0x0
    at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:279)
    at android.content.res.Resources.getValue(Resources.java:1466)
    at android.content.res.HwResources.getColor(HwResources.java:313)
    at android.content.res.Resources.getColor(Resources.java:1076)
    at me.dm7.barcodescanner.core.ViewFinderView.<init>(ViewFinderView.java:39)
    at me.dm7.barcodescanner.core.BarcodeScannerView.createViewFinderView(BarcodeScannerView.java:62)
    at me.dm7.barcodescanner.core.BarcodeScannerView.setupLayout(BarcodeScannerView.java:43)
    at me.dm7.barcodescanner.core.BarcodeScannerView.setupCameraPreview(BarcodeScannerView.java:81)
    at me.dm7.barcodescanner.core.CameraHandlerThread$1$1.run(CameraHandlerThread.java:31)
    at android.os.Handler.handleCallback(Handler.java:808)
    at android.os.Handler.dispatchMessage(Handler.java:101)
    at android.os.Looper.loop(Looper.java:166)
    at android.app.ActivityThread.main(ActivityThread.java:7529)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)



Thank
You seem to be missing some resource files that belongs with the project.
 

Raboebie

Member
Here is a link to a set of updated libraries. It fixes a bug when doing multiple/consecutive scans. It also moves the laser up/down while scanning takes place. It adds no additional functionality to the B4A code itself (library internal modifications only)
https://www.dropbox.com/s/y8c49je4fz0j6ce/ZbarBarcodeScannerNewLibFiles.zip?dl=0
Hi Johan,

I have been using this lib for a while now it works great but I'm wondering why /Objects/res/values and layout are cleaned every time I start the app again? This means it crashes as soon as the view opens. I have them placed in B4A/Objects
 
Top