Barcode Selection

Defined in namespace Scandit.DataCapture.Barcode.Selection.Capture

BarcodeSelection
class BarcodeSelection : IDataCaptureMode

Added in version 6.11.0

Data capture mode that implements barcode selection.

Learn more on how to use barcode selection in our Get Started With Barcode Selection guide.

This capture mode uses the barcode scanning and tracking capabilities. It cannot be used together with other capture modes that require the same capabilities, e.g. BarcodeCapture.

Learn more on how to use barcode selection in our Get Started With Barcode Selection guide.

Create()
static BarcodeSelection Create(DataCaptureContext context, BarcodeSelectionSettings settings)

Added in version 6.11.0

Constructs a new barcode selection mode with the provided context and settings. When the context is not null, the capture mode is automatically added to the context.

Create()
static BarcodeSelection Create(BarcodeSelectionSettings settings)

Added in version 6.11.0

Construct a new barcode selection mode with the provided settings. Calling this method is equivalent to calling :meth:ForDataSelectionContext with null as the context argument.

Enabled
bool Enabled { get;set; }

Added in version 6.11.0

Implemented from IDataCaptureMode. See IDataCaptureMode.Enabled.

Feedback
BarcodeSelectionFeedback Feedback { get;set; }

Added in version 6.11.0

Instance of BarcodeSelectionFeedback that is used by barcode selection to notify users about the selection of a barcode.

The default instance of the Feedback will have the sound enabled but no vibration. A default click tone will be used for the sound.

To change the feedback emitted, the BarcodeSelectionFeedback can be modified as shown below, or a new one can be assigned.

BarcodeSelection barcodeSelection  = ...;
barcodeSelection.Feedback.selection = new Feedback(Vibration.DefaultVibration, Sound.DefaultSound);
Context
DataCaptureContext Context { get; }

Added in version 6.11.0

Implemented from IDataCaptureMode. See IDataCaptureMode.Context.

PointOfInterest
PointWithUnit PointOfInterest { get;set; }

Added in version 6.11.0

The point of interest overwriting the point of interest of the data capture view. By default, this overwriting point of interest is not set and the one from the data capture view is used.

ApplySettingsAsync()
Task ApplySettingsAsync(BarcodeSelectionSettings settings)

Added in version 6.11.0

Asynchronously applies the new settings to the barcode selection. If the barcode selection is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the barcode selection is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.

RecommendedCameraSettings
static CameraSettings RecommendedCameraSettings { get; }

Added in version 6.11.0

Returns the recommended camera settings for use with barcode selection.

AddListener()
void AddListener(IBarcodeSelectionListener listener)

Added in version 6.11.0

Adds the listener to this barcode selection instance.

In case the same listener is already observing this instance, calling this method will not add the listener again.

RemoveListener()
void RemoveListener(IBarcodeSelectionListener listener)

Added in version 6.11.0

Removes a previously added listener from this barcode selection instance.

In case the listener is not currently observing this instance, calling this method has no effect.

Reset()
void Reset()

Added in version 6.11.0

Asynchronously resets the barcode selection session, effectively clearing the history of selected codes.

UnfreezeCamera()
void UnfreezeCamera()

Added in version 6.11.0

Unfreeze the camera.

FreezeCamera()
void FreezeCamera()

Added in version 6.19.0

Freeze the camera.

SelectUnselectedBarcodes()
void SelectUnselectedBarcodes()

Added in version 6.19.0

Select all the unselected barcodes that are being tracked in current the barcode selection session. This action is dispatched asynchronously and may happen on the next frame.

SelectAimedBarcode()
void SelectAimedBarcode()

Added in version 6.19.0

Select the barcode being aimed at. Only use this with manual aimer selection.

UnselectBarcodes()
void UnselectBarcodes(IList<Barcode> barcodes)

Added in version 6.19.0

Remove the barcodes from the list of selected barcodes.

IncreaseCountForBarcodes()
void IncreaseCountForBarcodes(IList<Barcode> barcodes)

Added in version 6.19.0

Increments the count of how many times the given barcodes have been selected.

SetSelectBarcodeEnabled()
void SetSelectBarcodeEnabled(Barcode barcode, bool enabled)

Added in version 6.19.0

Enables or disables the selection of a barcode.

SessionUpdated
event EventHandler<BarcodeSelectionEventArgs> SessionUpdated

Added in version 6.13.0

Occurs after a frame has been processed by barcode selection and the session has been updated. In contrast to SelectionUpdated, this event occurs, regardless whether a code was selected or not.

IFrameData is null if the camera is frozen and the selection is changed.

SelectionUpdated
event EventHandler<BarcodeSelectionEventArgs> SelectionUpdated

Added in version 6.13.0

Occurs when a barcode is selected or a previously selected barcode is unselected.

IFrameData is null if the camera is frozen and the selection is changed.