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 Cordova
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.
enum Scandit::Barcode::Symbology |
An enumeration of all supported barcode symbologies.
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, 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 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, e.g.
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)