Note
This API is still in beta and may change in future versions of Scandit Data Capture SDK.
Scanned Barcode
Defined in package com.scandit.datacapture.usi.capture.component.barcode
- ScannedBarcode
class ScannedBarcode : ScannedComponent
Added in version 8.0.0
A scanned barcode component in the item-based scanning APIs. This class represents a detected and decoded barcode with all its associated data and metadata.
ScannedBarcode implements the ScannedComponent protocol, providing a unique identifier and location information, along with barcode-specific properties such as symbology, payload data, and decoding metadata.
- definitionIdentifier
@NonNull BarcodeIdentifier getDefinitionIdentifier()
Added in version 8.1.0
The unique identifier for the definition of this barcode component.
- identifier
@NonNull ScannedComponentIdentifier getIdentifier()
Added in version 8.0.0
The unique identifier for this instance of the barcode component.
- location
@NonNull Quadrilateral getLocation()
Added in version 8.0.0
The location of the barcode as a quadrilateral.
- payloadString
@Nullable String getPayloadString()
Added in version 8.0.0
The data of this barcode as a unicode string. May be null for barcodes containing non-printable characters, or characters that cannot be represented as unicode code points, or nul-bytes in the middle of the string
- payloadData
byte[] getPayloadData()Added in version 8.0.0
The raw data contained in the barcode. Use this property instead of payloadString when dealing with binary-encoded data.
- addOnPayloadString
@Nullable String getAddOnPayloadString()
Added in version 8.0.0
The add-on payload string if the barcode has an add-on. null if the barcode does not have an add-on.
- compositePayloadString
@Nullable String getCompositePayloadString()
Added in version 8.0.0
The composite payload string if the barcode is part of a composite barcode. null if the barcode is not composite.
- compositePayloadData
byte[] getCompositePayloadData()Added in version 8.0.0
The raw composite payload data if the barcode is part of a composite barcode. null if the barcode is not composite.
- encodingRanges
@NonNull List<@NonNull EncodingRange> getEncodingRanges()
Added in version 8.0.0
Array of encoding ranges. Each entry of the returned encoding array points into bytes of payloadData and indicates what encoding is used for these bytes. This information can then be used to convert the bytes to unicode, or other representations. For most codes, a single encoding range covers the whole data, but certain 2d symbologies, such as Symbology.QR allow to switch the encoding in the middle of the code.
- isGS1DataCarrier
booleanisGS1DataCarrier()Added in version 8.0.0
True for codes that carry GS1 data.
- compositeFlag
CompositeFlag getCompositeFlag()
Added in version 8.0.0
Flag to hint whether the barcode is part of a composite code.
- isColorInverted
booleanisColorInverted()Added in version 8.0.0
Whether the recognized code is color inverted (printed bright on dark background).
- symbolCount
intgetSymbolCount()Added in version 8.0.0
The symbol count of this barcode.
- frameId
longgetFrameId()Added in version 8.0.0
Id of the frame from which this barcode information was obtained.
- isStructuredAppend
booleanisStructuredAppend()Added in version 8.0.0
Whether the barcode is a structured append barcode.