Class

Barcode


Description

Uses the device's camera to read any bar code types supported by the device.

Methods

Name

Parameters

Returns

Shared

FromImage

image As Picture

String()

Image

value As String, Size As Double, type As Barcode.Types = Barcode.Types.QR

Picture

StartScan

StopScan

Events

Name

Parameters

Returns

ScanCancelled

ScanCompleted

value As String

ScanFailed

Enumerations

Barcode.Types

Types

The types of barcodes that can be read.

Name

QR

Bar128

Method descriptions


Barcode.FromImage

FromImage(image As Picture) As String()

Returns an array of the unique identifiers from all detected barcodes in the image provided.

This method is shared.

Important

This method is not currently supported for Android.


Barcode.Image

Image(value As String, Size As Double, type As Barcode.Types = Barcode.Types.QR) As Picture

Returns an image with the value encoded as the specified type of barcode.

This method is shared.

Important

This method is not currently supported for Android.


Barcode.StartScan

StartScan

Opens the scanning user interface provided by the device to scan a barcode. The device will auto-detect the type of barcode.

Important

For macOS, this method requires macOS 10.15 or later.


Barcode.StopScan

StopScan

Stops the process of scanning barcodes and closes the scanning user interface on the device.

Important

This method is not currently supported for Android.

Event descriptions


Barcode.ScanCancelled

ScanCancelled

The user canceled the scan.


Barcode.ScanCompleted

ScanCompleted(value As String)

A barcode was successfully scanned. The value is the unique identifier scanned.


Barcode.ScanFailed

ScanFailed

The scan was not able to complete.

Notes

For Android Play Store installs, the Play Store will download and install the barcode library if it was not already installed on the device. For non Play Store-installs, the OS will download the library after it is first used (if it is not already installed). Attempting to scan before the library is installed (which could take several minutes depending on how the OS prioritizes it) will result in the ScanFailed event will be called until it completes.

On Linux, X11 is required. This class is not supported for Wayland.

Supported barcode types

The following types of barcodes are supported:

Type

Description

UPC-E

Only has 8 digits and is used instead of UPC-A on smaller products. It is similarly used in retail and warehousing, especially in the USA and Canada.

Code39

Widely used in a variety of industries and is part of of many governmental specifications. It encodes a set of alphanumeric symbols.

EAN13

Codes are widely used in retail across Europe. There are several versions of EAN encoding 2, 5, 7 or 12 digits.

EAN8

Derived from the longer European Article Number (EAN-13) code. It was introduced for use on small packages where an EAN-13 barcode would be too large.

Code93

Encodes numerical input, as well as capital letters and some special characters. It used by Canada Post for additional delivery information.

Code128

Universal barcode with excellent data density. It is used, for example, in shipping and packaging.

PDF417

Suitable for storing large amounts of data due to its two-dimensional structure. It is widely used for labeling electronic equipment or hazardous materials, but also on personal IDs.

QR

Applications include product tracking, item identification, time tracking, document management, and general marketing.

Aztec

Two-dimensional Barcodes and has a characteristic square pattern in the middle. This Code is widely used by railway companies in their ticketing systems.

Interleaved2of5

Developed on the basis of Industrial Code 2 of 5 and only encodes an even number of digits. It is used in warehousing and industrial applications.

ITF14

Also called SCC-14 is used to mark shipping containers. It is also placed on cartons and pallets and signifies the type of products transported.

Data Matrix

Two-dimensional Code that may contain text, numbers or binary data. It is widely used for labeling small electronic components or in food production, but also on mail labels.

Compatibility

Desktop, iOS and Android projects types on all supported operating systems.

See also

Object parent class