Scanner

Overview

Are you thinking in implements a barcode reader in your app? TotalCross have a simple solution. It is easy to make a Scanner application and there is an example ready to use on GitHub!

Methods

How to use

There are two ways to make the scanner.

With Scandit:

When we do a Scanner.readBarcode and we set on parameter characters "scandit:" with a String contains the scandit key and the camera be call and will capture the image and set on the label result. You will use like this:

scan = Scanner.readBarcode("scandit:" + YOUR_SCANDIT_KEY);

With ZXing:

In here, we have a little more work because we need find the barcode's mode, if is a 1D or 2D and just after that, we can write Scanner.readBarcode and set the mode and a message telling the user how scanner the barcode.

scan = Scanner.readBarcode("mode=" + mode + "&msg=" + msg);

References

Last updated