Barcode Scanner Prefab is used to scan the 1D Barcodes via web cams and mobile cams.
Supported codes are Code 39, Code 93, Code 128, Codabar, Interleaved 2 of 5, EAN-8, EAN-13, UPC-A, UPC-E, Industrial 2 of 5.
It uses the third party javascript library called Dynamsoft to scan the barcode. This Dynamsoft library is a paid one. Because of its Accuracy and Performance.And also it supports 2D barcodes and QR-codes.
Pre-requisites
1. It needs atleast 720p cam to recognize a barcode properly in low light.
2. You need to buy a license key for Barcode Scanner from Dynamsoft Website.
3. You have to know ,what kind of barcode format needs to supported by your application.
Implementation
1.Create a project as prefab in wavemaker.
2.Add a Dynamsoft javascript lib by uploading a javascript lib(dbr-6.5.1.min.js once you register, you will get) and adding a script in index.html
3.Go to config prefab and add in-bound and out-bound values for getting input and output.
4.Add a configuration in script page on onready() for barcode format.
5.Drag and drop a button and give name as scan and add a onclick events as javascript to configure the dynamsoft service.

 

6.Drag and drop an another button to stop the dynamsoft service and give show property as disable.
In onclick event give as javascript.
7.Deploy the created prefab.
Usage
1. Drag and Drop the barcode scanner prefab.
2. Insert the license key that you bought from Dynamsoft website in the license key textbox on property tab.
3. Check the barcode format checkboxes to makesure the application support only checked barcode formats.
4.Bind the value of any text supported widget with out-bound value(barcodedata) of barcode reader prefab to get the barcode data.
Deployment
1. After Deploying, click the scan button to open the live stream and start the service to scan barcode.
2. You can able to select cameras if more than one camera is present by selecting the first dropdown under livestream. It will displays list of cameras that are available.
3. You can able to select camera resolution if available. if not it will choose the default one.
The Stop button will stop the livestream and end the service.
4. After placing the barcode infront of camera it will scan and decode the code then return the code to binded widget.