Classes

enum  CompositeFlag
 
enum  Symbology
 

Public Member Functions

boolean isGs1DataCarrier ()
 
boolean isRecognized ()
 

Public Attributes

Symbology symbology
 
String data
 
int[] rawData
 
CompositeFlag compositeFlag
 
Quadrilateral location
 

Detailed Description

Represents a recognized/localized barcode/2D code.

The Barcode class represents a barcode, or 2D code that has been localized or recognized by the barcode recognition engine.

Since
4.11.0

Class Documentation

enum Scandit::Barcode::CompositeFlag

Composite flags for barcodes/2D codes.

Class Members
NONE Code is not part of a composite code.
UNKNOWN Code could be part of a composite code.

This flag is set by linear (1d) symbologies that have no composite flag support but can be part of a composite code like the EAN/UPC symbology family.

LINKED Code is the linear component of a composite code.

This flag can be set by GS1 DataBar or GS1-128 (Code 128).

GS1_TYPE_A Code is a GS1 Composite Code Type A (CC-A).

This flag can be set by MicroPDF417 codes.

GS1_TYPE_B Code is a GS1 Composite Code Type B (CC-B).

This flag can be set by MicroPDF417 codes.

GS1_TYPE_C Code is a GS1 Composite Code Type C (CC-C).

This flag can be set by PDF417 codes.

enum Scandit::Barcode::Symbology

An enumeration of all supported barcode symbologies.

Class Members
UNKNOWN Sentinel value to represent an unknown symbology.
EAN13 EAN13 1D barcode symbology.
EAN8 EAN8 1D barcode symbology.
UPCA UPC12/UPCA 1D barcode symbology.
UPCE UPCE 1D barcode symbology.
CODE11 Code 11 barcode symbology.

Only available in the Professional and Enterprise Packages.

CODE128 Code 128 1D barcode symbology, including GS1-Code128.

Only available in the Professional and Enterprise Packages.

CODE39 Code39 barcode symbology.

Only available in the Professional and Enterprise Packages.

CODE93 Code 93 barcode symbology.

Only available in the Professional and Enterprise Packages.

ITF Interleaved-Two-of-Five (ITF) 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

QR QR Code 2D barcode symbology.
DATA_MATRIX Datamatrix 2D barcode symbology.

Only available in the Professional and Enterprise Packages.

PDF417 PDF417 barcode symbology.

Only available in the Professional and Enterprise Packages.

MSI_PLESSEY MSI Plessey 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

GS1_DATABAR Databar 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

GS1_DATABAR_LIMITED Databar Limited 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

GS1_DATABAR_EXPANDED Databar Expanded 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

CODABAR Codabar 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

AZTEC Aztec 2D barcode symbology.

Only available in the Professional and Enterprise Packages.

MAXICODE Maxicode 2D barcode symbology.

Only available in the Professional and Enterprise Packages.

FIVE_DIGIT_ADD_ON Five-digit add-on for UPC and EAN codes.

In order to scan five-digit add-on codes, at least one of these symbologies must be activated as well: SYMBOLOGY_EAN13, SYMBOLOGY_UPCA, SYMBOLOGY_UPCE, or SYMBOLOGY_EAN8 and the maximum number of codes per frame has to be set to at least 2.

Only available in the Professional and Enterprise Packages.

TWO_DIGIT_ADD_ON Two-digit add-on for UPC and EAN codes.

In order to scan two-digit add-on codes, at least one of these symbologies must be activated as well: SYMBOLOGY_EAN13, SYMBOLOGY_UPCA, SYMBOLOGY_UPCE, or SYMBOLOGY_EAN8 and the maximum number of codes per frame has to be set to at least 2.

Only available in the Professional and Enterprise Packages.

Member Function Documentation

boolean isGs1DataCarrier ( )

Whether the code is a GS1 data carrier.

Returns
True if the code is a GS1 data carrier, false if not. False is returned for codes that have only been localized but not recognized.
boolean isRecognized ( )

Whether the code was completely recognized.

This property is true for barcodes that were completely recognized and false for codes that were localized but not recognized. For codes returned by BarcodeScannerSession.getNewlyRecognizedCodes() and BarcodeScannerSession.getAllRecognizedCodes() this method always returns true, for codes returned by BarcodeScannerSession.getNewlyLocalizedCodes() isRecognized() always returns false.

Returns
True if the code has been recognized.

Member Data Documentation

Symbology symbology

The symbology of a recognized barcode.

Codes for which isRecognized() returns false, SYMBOLOGY_UNKNOWN is returned. For all other codes, the symbology of the recognized code is returned.

String data

The data contained in the barcode/2D code, for example the 13 digit number of an EAN13 code.

For some types of barcodes/2D codes (for example DATAMATRIX, AZTEC, PDF417), the data string may contain non-printable characters and nul-bytes in the middle of the string. Use rawData if your application scans these types of codes and you are expecting binary/non-printable data.

Returns
the data contained in the code.
int [] rawData

The data contained in the barcode/2D code, for example the 13 digit number of an EAN13 code.

The data is stored as an array of integers, where each item in the array corresponds to the char code. Use this property instead of data if your application expects to scan codes containing binary data that can not be represented as UTF-8 strings.

CompositeFlag compositeFlag

the composite flag of the barcode

For codes that have been localized but not recognized, CompositeFlag.UNKNOWN is returned.

Quadrilateral location

The location of the code in the image.

The location is returned as a a polygon with 4 corners. The corners are in the coordinate system of the raw preview image. In order to be displayed they must be transformed to the coordinate system of the view. The meaning of the values of topLeft, topRight etc is such that the topLeft point corresponds to the top-left corner of the barcode regardless of how it is oriented in the image.

Returns
The location of the code as a quadrilateral.
See also
Scandit.BarcodePicker::convertPointToPickerCoordinates(Point)