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
val definitionIdentifier: BarcodeIdentifier
Added in version 8.1.0
The unique identifier for the definition of this barcode component.
- identifier
val identifier: ScannedComponentIdentifier
Added in version 8.0.0
The unique identifier for this instance of the barcode component.
- location
val location: Quadrilateral
Added in version 8.0.0
The location of the barcode as a quadrilateral.
- payloadString
val payloadString: String?
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
val payloadData: ByteArrayAdded 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
val addOnPayloadString: String?
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
val compositePayloadString: String?
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
val compositePayloadData: ByteArray?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
val encodingRanges: List<EncodingRange>
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
val isGS1DataCarrier:
BooleanAdded in version 8.0.0
True for codes that carry GS1 data.
- compositeFlag
val compositeFlag: CompositeFlag
Added in version 8.0.0
Flag to hint whether the barcode is part of a composite code.
- isColorInverted
val isColorInverted:
BooleanAdded in version 8.0.0
Whether the recognized code is color inverted (printed bright on dark background).
- symbolCount
val symbolCount:
IntAdded in version 8.0.0
The symbol count of this barcode.
- frameId
val frameId:
LongAdded in version 8.0.0
Id of the frame from which this barcode information was obtained.
- isStructuredAppend
val isStructuredAppend:
BooleanAdded in version 8.0.0
Whether the barcode is a structured append barcode.