Public Member Functions | |
void | DidScan (IScanSession session) |
Detailed Description
Interface definition for a callback to be invoked when one or more barcodes were recognized.
Member Function Documentation
void DidScan | ( | IScanSession | session | ) |
Called whenever a new barcode has been successfully recognized.
Newly recognized codes are available as IScanSession.NewlyRecognizedCodes. When DidScan callback is invoked, there is always at least one new code available.
The callback is invoked in the thread running the barcode recognition engine. This means, any change to the graphical user interface will have to be moved to the UI thread. Likewise, Since the callback blocks the engine, any expensive calculation should be posted to a Handler.
When no more codes should be scanned, call IScanSession.StopScanning, when the scan session should be paused, call IScanSession.PauseScanning(). Calling these two methods is preferred over calling BarcodePicker.StopScanning and BarcodePicker.PauseScanning, as it will immediately stop/pause the scanning.
Note, it is only safe to access the session object inside the DidScan callback, but you can safely store the lists of barcodes returned by IScanSession.AllRecognizedCodes and IScanSession.NewlyRecognizedCodes
- Parameters
-
session current scan session
- See also
- ScanditBarcodePicker.Android.IScanSettings.SetCodeDuplicateFilter
- ScanditBarcodePicker.Android.IScanSettings.SetCodeCachingDuration