SparkScan Listener
Defined in namespace Scandit.DataCapture.Barcode.Spark.Capture
- ISparkScanListener
interface ISparkScanListener
Added in version 6.17.0
Listener interface for traditional SparkScan.
- OnBarcodeScanned()
void
OnBarcodeScanned(SparkScan sparkScan, SparkScanSession session, IFrameData frameData)Added in version 6.17.0
Invoked whenever a code has been scanned. The newly scanned barcode can be retrieved from SparkScanSession.NewlyRecognizedBarcode.
This method is invoked from a recognition internal thread. To perform UI work, you must dispatch to the main thread first. After receiving this callback, you will typically want to start processing the scanned barcodes. Keep in mind however, that any further recognition is blocked until this method completes. Therefore, if you need to perform a time-consuming operation, like querying a database or opening an URL encoded in the barcode data, consider switching to another thread.
Sometimes, after receiving this callback, you may want to stop scanning. You can do that by disabling the SparkScan.
IFrameData is null if the camera is frozen and the selection is changed.
- OnSessionUpdated()
void
OnSessionUpdated(SparkScan sparkScan, SparkScanSession session, IFrameData frameData)Added in version 6.17.0
Invoked after a frame has been processed by SparkScan and the session has been updated. In contrast to OnBarcodeScanned(), this method is invoked, regardless whether a code was scanned or not. If codes were recognized in this frame, this method is invoked after OnBarcodeScanned().
This method is invoked from a recognition internal thread. To perform UI work, you must dispatch to the main thread first. Further recognition is blocked until this method completes. It is thus recommended to do as little work as possible in this method.
IFrameData is null if the camera is frozen and the selection is changed.
- SparkScanEventArgs
class SparkScanEventArgs : EventArgs
Added in version 6.17.0
Provides data for the SparkScan.BarcodeScanned and SparkScan.SessionUpdated events.
- SparkScanEventArgs()
SparkScanEventArgs(SparkScan sparkScan, SparkScanSession session, IFrameData frameData)
Added in version 6.17.0
- Session
SparkScanSession Session { get; }
Added in version 6.17.0
- FrameData
IFrameData FrameData { get; }
Added in version 6.17.0