Barcode Capture#

Defined in namespace Scandit.Datacapture.Barcode

BarcodeCapture#
class BarcodeCapture : IDataCaptureMode

Added in version 6.2.0

Capture mode for single barcode scanning. For MatrixScan-based barcode capture, use BarcodeTracking instead.

Learn more on how to use barcode capture in our Get Started With Barcode Scanning guide.

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

Create()#
static BarcodeCapture Create(DataCaptureContext context, BarcodeCaptureSettings settings)

Added in version 6.2.0

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

FromJson()#
static BarcodeCapture FromJson(DataCaptureContext dataCaptureContext, string jsonData)

Added in version 6.2.0

Construct a new barcode capture mode with the provided JSON serialization. See Serialization for details. The capture mode is automatically added to the context.

Enabled#
bool Enabled

Added in version 6.2.0

Implemented from IDataCaptureMode. See IDataCaptureMode.Enabled.

PointOfInterest#
PointWithUnit PointOfInterest

Added in version 6.2.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. The overwriting point of interest is used to control the center of attention for the following subsystems:

  • Location selection. When no location selection is set, the point of interest defines the location at which the recognition optimizes for reading barcodes.

  • Rendered viewfinders.

ApplySettingsAsync()#
Task ApplySettingsAsync(BarcodeCaptureSettings settings)

Added in version 6.2.0

Asynchronously applies the new settings to the barcode scanner. If the scanner is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the scanner 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.

Feedback#
BarcodeCaptureFeedback Feedback

Added in version 6.2.0

Instance of BarcodeCaptureFeedback that is used by the barcode scanner to notify users about Success and Failure events.

The default instance of the Feedback will have both sound and vibration enabled. A default beep sound will be used for the sound.

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

BarcodeCapture barcodeCapture  = ...;
barcodeCapture.Feedback.Success = new Feedback(Vibration.DefaultVibration, Sound.DefaultSound);
AddListener()#
void AddListener(IBarcodeCaptureListener listener)

Added in version 6.2.0

Adds the listener to this barcode capture instance.

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

RemoveListener()#
void RemoveListener(IBarcodeCaptureListener listener)

Added in version 6.2.0

Removes a previously added listener from this barcode capture instance.

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

RecommendedCameraSettings#
static CameraSettings RecommendedCameraSettings {readonly}

Added in version 6.2.0

Returns the recommended camera settings for use with barcode capture.

Context#
DataCaptureContext Context {readonly}

Added in version 6.2.0

Implemented from IDataCaptureMode. See IDataCaptureMode.Context.

UpdateFromJson()#
void UpdateFromJson(string jsonData)

Added in version 6.2.0

Updates the mode according to a JSON serialization. See Serialization for details.