Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Android

Inherits NativeHandle.

Inherited by TrackedBarcode.

Public Member Functions

int getSymbology ()
 
String getSymbologyName ()
 
boolean isGs1DataCarrier ()
 
int getCompositeFlag ()
 
boolean isRecognized ()
 
byte[] getRawData ()
 
String getData ()
 
Quadrilateral getLocation ()
 
boolean isColorInverted ()
 

Static Public Member Functions

static String symbologyToString (int sym)
 
static int symbologyFromString (String symbologyName)
 

Static Public Attributes

static final int[] ALL_SYMBOLOGIES
 

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.

Member Function Documentation

◆ getSymbology()

int getSymbology ( )

Returns the symbology of a recognized barcode.

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

Reimplemented in TrackedBarcode.

◆ getSymbologyName()

String getSymbologyName ( )

Convenience method to directly get the name of the symbology as a string.

Returns
The symbology name as a lower-case string, e.g. ean13, or codabar.

Reimplemented in TrackedBarcode.

◆ isGs1DataCarrier()

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.

Reimplemented in TrackedBarcode.

◆ getCompositeFlag()

int getCompositeFlag ( )

Whether the code is part of a composite code.

Returns
The composite flag of the code. SC_COMPOSITE_FLAG_UNKNOWN is returned for codes that have only been localized but not recognized.

Reimplemented in TrackedBarcode.

◆ isRecognized()

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.

Reimplemented in TrackedBarcode.

◆ getRawData()

byte [] getRawData ( )

The raw byte data contained in the barcode.

Use this method in case you are encoding binary data in barcodes\2D codes that cannot be represented as UTF-8 strings.

Returns
The raw byte data.

Reimplemented in TrackedBarcode.

◆ getData()

String getData ( )

The data contained in the barcode/2D code, e.g.

the 13 digit number of a 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 getRawData() if your application scans these types of codes and you are expecting binary/non-printable data.

Returns
the data contained in the code.

Reimplemented in TrackedBarcode.

◆ getLocation()

Quadrilateral getLocation ( )

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
com.scandit.barcodepicker.BarcodePicker::convertPointToPickerCoordinates(Point)

Reimplemented in TrackedBarcode.

◆ isColorInverted()

boolean isColorInverted ( )

Whether the recognized code is color inverted.

Returns
True if the code has been recognized and is color-inverted (printed bright on dark). For codes that have been localized but not recognized, this method returns false.
Since
5.5

◆ symbologyToString()

static String symbologyToString ( int  sym)
static

Helper function to convert a symbology enum to a string representing it.

Parameters
symsymbology enum
Returns
the string representing the given symbology

◆ symbologyFromString()

static int symbologyFromString ( String  symbologyName)
static

Helper function to convert a symbology string to its corresponding symbology enum.

Parameters
symbologyNamestring with symbology name
Returns
the enum value for the given symbology string

Member Data Documentation

◆ SYMBOLOGY_UNKNOWN

final int SYMBOLOGY_UNKNOWN
static

Sentinel value to represent an unknown symbology.

◆ SYMBOLOGY_EAN13

final int SYMBOLOGY_EAN13
static

EAN-13 1D barcode symbology.

◆ SYMBOLOGY_EAN8

final int SYMBOLOGY_EAN8
static

EAN-8 1D barcode symbology.

◆ SYMBOLOGY_UPCA

final int SYMBOLOGY_UPCA
static

UPC-12/UPC-A 1D barcode symbology.

◆ SYMBOLOGY_UPCE

final int SYMBOLOGY_UPCE
static

UPC-E 1D barcode symbology.

◆ SYMBOLOGY_CODE128

final int SYMBOLOGY_CODE128
static

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

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_CODE11

final int SYMBOLOGY_CODE11
static

Code 11 barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_CODE25

final int SYMBOLOGY_CODE25
static

Code 25 barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_CODE32

final int SYMBOLOGY_CODE32
static

Code 32 barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_CODE39

final int SYMBOLOGY_CODE39
static

Code 39 barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_CODE93

final int SYMBOLOGY_CODE93
static

Code 93 barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_INTERLEAVED_2_OF_5

final int SYMBOLOGY_INTERLEAVED_2_OF_5
static

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

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_QR

final int SYMBOLOGY_QR
static

QR Code 2D barcode symbology.

◆ SYMBOLOGY_MICRO_QR

final int SYMBOLOGY_MICRO_QR
static

MicroQR Code 2D barcode symbology.

◆ SYMBOLOGY_DATA_MATRIX

final int SYMBOLOGY_DATA_MATRIX
static

Data Matrix 2D barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_PDF417

final int SYMBOLOGY_PDF417
static

PDF417 barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_MICRO_PDF417

final int SYMBOLOGY_MICRO_PDF417
static

MicroPDF417 barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_MSI_PLESSEY

final int SYMBOLOGY_MSI_PLESSEY
static

MSI Plessey 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_GS1_DATABAR

final int SYMBOLOGY_GS1_DATABAR
static

GS1 DataBar 14 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_GS1_DATABAR_EXPANDED

final int SYMBOLOGY_GS1_DATABAR_EXPANDED
static

GS1 DataBar Expanded 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_GS1_DATABAR_LIMITED

final int SYMBOLOGY_GS1_DATABAR_LIMITED
static

GS1 DataBar Limited 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_CODABAR

final int SYMBOLOGY_CODABAR
static

Codabar 1D barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_AZTEC

final int SYMBOLOGY_AZTEC
static

Aztec Code 2D barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_MAXICODE

final int SYMBOLOGY_MAXICODE
static

MaxiCode 2D barcode symbology.

Only available in the Professional and Enterprise Packages.

◆ SYMBOLOGY_TWO_DIGIT_ADD_ON

final int SYMBOLOGY_TWO_DIGIT_ADD_ON
static

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.

◆ SYMBOLOGY_FIVE_DIGIT_ADD_ON

final int SYMBOLOGY_FIVE_DIGIT_ADD_ON
static

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.

◆ SYMBOLOGY_KIX

final int SYMBOLOGY_KIX
static

Royal Dutch TPG Post KIX.

Only available in Professional and Enterprise Packages

◆ SYMBOLOGY_RM4SCC

final int SYMBOLOGY_RM4SCC
static

Royal Mail 4 State Customer Code (RM4SCC)

Only available in Professional and Enterprise Packages

◆ SYMBOLOGY_LAPA4SC

final int SYMBOLOGY_LAPA4SC
static

LAPA 4 State Code.

Only available in Professional and Enterprise Packages

◆ SYMBOLOGY_DOTCODE

final int SYMBOLOGY_DOTCODE
static

Dot Code.

Only available in Professional and Enterprise Packages

◆ ALL_SYMBOLOGIES

final int [] ALL_SYMBOLOGIES
static

Enumerates all symbologies.

◆ SC_COMPOSITE_FLAG_NONE

final int SC_COMPOSITE_FLAG_NONE
static

Code is not part of a composite code.

◆ SC_COMPOSITE_FLAG_UNKNOWN

final int SC_COMPOSITE_FLAG_UNKNOWN
static

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.

◆ SC_COMPOSITE_FLAG_LINKED

final int SC_COMPOSITE_FLAG_LINKED
static

Code is the linear component of a composite code.

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

◆ SC_COMPOSITE_FLAG_GS1_A

final int SC_COMPOSITE_FLAG_GS1_A
static

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

This flag can be set by MicroPDF417 codes.

◆ SC_COMPOSITE_FLAG_GS1_B

final int SC_COMPOSITE_FLAG_GS1_B
static

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

This flag can be set by MicroPDF417 codes.

◆ SC_COMPOSITE_FLAG_GS1_C

final int SC_COMPOSITE_FLAG_GS1_C
static

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

This flag can be set by PDF417 codes.


The documentation for this class was generated from the following file:
  • Barcode.java