SparkScan Session
Defined in package com.scandit.datacapture.barcode.spark.capture
- SparkScanSession
class SparkScanSessionAdded in version 6.11.0
The SparkScan session is responsible for determining the list of relevant barcodes by filtering out duplicates. This filtering of duplicates is completely time-based and does not use any information about the location of the barcode. By default, all the codes scanned in a frame are always reported. It is possible to filter out codes recently scanned by changing SparkScanSettings.codeDuplicateFilter.
When the SparkScan mode is disabled, the session’s duplicate filter is reset.
Important
The SparkScan session should only be accessed from within onBarcodeScanned() or onSessionUpdated() and from the thread these methods are called from. It is not safe to be accessed from anywhere else since it may be concurrently modified.
- newlyRecognizedBarcode
val newlyRecognizedBarcode: Barcode?
Added in version 6.26.0
Last newly recognized barcode in the last processed frame.
- allScannedItems
val allScannedItems: List<ScannedItem>
Added in version 8.0.0
An array containing all scanned items detected during the current session. Each ScannedItem represents a logical grouping of scan components (barcodes and text) that were recognized together.
Note
This API is still in beta and may change in future versions of Scandit Data Capture SDK.
- newlyRecognizedItems
val newlyRecognizedItems: List<ScannedItem>
Added in version 8.0.0
An array containing newly recognized items detected in the last processed frame. Each ScannedItem represents a logical grouping of scan components (barcodes and text) that were recognized together.
Note
This API is still in beta and may change in future versions of Scandit Data Capture SDK.
- reset()
fun reset()Added in version 6.11.0
Resets the SparkScan session, effectively clearing the history of scanned codes. This affects duplicate filtering: when calling reset() every frame has the same effect as setting the SparkScanSettings.codeDuplicateFilter to 0. This function should only be called inside the listeners’ callback.
- toJson()
fun toJson(): String
Added in version 6.16.0
Returns the JSON representation of the SparkScan session.
- frameSequenceId
val frameSequenceId:
LongAdded in version 6.11.0
The identifier of the current frame sequence.
Important
As long as there is no interruption of frames coming from the camera, the frameSequenceId will stay the same. Note that every time target mode is switched on or off, this number will change.