

You can download and test any posting of mine in this thread but if you want to use it then you need toĪctivity.If nothing happens when you scan a QR code with your camera, you may need to activate Google Lens manually. Starts scanner, using device default camera

SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int).SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int).Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int).DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map).'Do not forget to load the layout file created with the visual designer. Sub Activity_Create(FirstTime As Boolean) 'These variables can only be accessed from this module. 'These global variables will be redeclared each time the activity is created. 'These variables can be accessed from all modules. 'These global variables will be declared once when the application starts. 'SupportedOrientations possible values: unspecified, landscape or portrait. Extract them from the zipped file and copy them to your additional library folder. I have zipped them together - you can download them from HERE. You will need core-3.1.0.jar and android-support-v4.jar to be in your additional library folder. There are permissions added to the B4A manifest - make sure you take note of it should you start a new B4A project. There are a number of files in the B4A project's Object/res/. scanner_stopped - this event is raised when the scanner is stopped. scan_error - sorry, but have not seen this event in action yet as I have had no miss scans thus farĤ. scanner_started - this event is raised when the scanner is activated via B4A codeģ.

scanresult - here you can get the decoded string/text result when a successful scan occurredĢ. I have added the following events to the B4A project:ġ. Just point the scanner at the next barcode to scan. It is as simple as that.įor as long as what the scanner is active it will scan 1D/2D barcodes i.e no need to stop and start the scanner to start scanning a new barcode. Add buttons to start and stop the scanner. It does not take over control of the B4A activity - set the size (width / height / left / top) of the CustomView in the B4A code and that will be the size of your barcode View Finder. It does not have all the bells and whistles that the ZXING project offers (i.e ability to set the laser color etc) but it works 100% within B4A. Thus, you can add buttons, background images, background colors, labels, textviews, or whatever you like to the activity via the designer or via code. It is 100% embedded within the B4A project via a CustomView. I have successfully scanned the following 1D and 2D barcodes: It is a barcode scanner based on the ZXING project. The attached project wraps this Github project.
