How do I add barcode scanning using the camera?

Barcode scanning can be a useful addition to bezls, especially on the shop floor to speed up transaction processing and ensure better data quality. This article shows how to add barcode scanning in minutes!

In this case, I was working on a location transfer app, and I wanted the ability to scan the part id, from warehouse, from bin, to warehouse, to bin, and quantity so that users could quickly move from field to field while processing a location transfer.

Here is an example of adding barcode scanning for selecting the part id:


I had already built out the base bezl page which had the input box, and a button I could click to initiate the scan process:


In my function that I named “scan” I called the barcode scanning service scan function, which returns as a promise for further handling:

(result => {
// result.text will contain the barcode results
.catch(err => {
// do something

From there you can do whatever you want with it!