Skip to main content

Advanced Configurations

SparkScan is optimized by default for efficiency, accuracy, and a seamless user experience. However, there are some cases where you might want to customize the behavior of SparkScan. This guide will show you how to add additional capabilities and further customize SparkScan to best fit your needs.

Advanced Capabilities

Hardware Button Control

Allowing the end user to control the scanner with hardware buttons can be useful if your users typically wear gloves. It can also improve ergonomics in some workflows.

SparkScan offers a built-in API to let you do this via scandit.datacapture.barcode.spark.ui.SparkScanViewSettings.HardwareTriggerEnabled.

Reject Barcodes

To prevent scanning unwanted barcodes (like those already listed or from incorrect lots), use SparkScan’s built-in error state. Setting the SDCSparkScanBarcodeErrorFeedback.resumeCapturingDelay parameter to 0 allows the user to continue scanning immediately without pausing on rejected codes.

Add Advanced Scanning Modes to the Setting Toolbar

SparkScan is our best solution for high-speed single scanning and scan-intensive workflows. Depending on your use case, you can use SparkScan in conjunction with other Scandit advanced scanning modes, such as MatrixScan Find or MatrixScan Count, to speed up your workflows.

SparkScan offers pre-build buttons you can add to the setting toolbar to easily move to different scan modes from within the SparkScan UI.

First you will need to show these buttons:

// Show the MatrixScan Count and MatrixScan Find buttons
sparkScanView.BarcodeCountButtonVisible = true;
sparkScanView.BarcodeFindButtonVisible = true;

In addition you have to add a listener to the scandit.datacapture.barcode.spark.ui.SparkScanView via scandit.datacapture.barcode.spark.ui.SparkScanView.UiListener. You will then receive callbacks when the Barcode Find button or Barcode Count button is tapped from the toolbar.

this.sparkScanView.BarcodeCountButtonTapped += BarcodeCountButtonTapped;
this.sparkScanView.BarcodeFindButtonTapped += BarcodeFindButtonTapped;

//...

private void BarcodeFindButtonTapped(object sender, SparkScanViewEventArgs e)
{

}

private void BarcodeCountButtonTapped(object sender, SparkScanViewEventArgs e)
{

}

Customization

Customize Color and Text

All text, colors and opacity of the SparkScan UI elements (trigger button, setting toolbar, toasts) can be customized to match the desired language and color scheme.

Please refer to SDCSparkScanView for the full list of parameters.

Add Controls to the Setting Toolbar

The Setting Toolbar comes with default buttons included, but the full list of available controls includes:

  • Target Mode (visible by default)
  • Continuous Mode
  • Torch Control (visible by default)
  • Audio Feedback Control
  • Haptics Control
  • Left-handed Mode

In some cases you want to avoid end users from accessing these controls, for example to prevent them from:

  • Disabling audio feedback on scan, as the work environment is always noisy
  • Toggling the continuous mode, as you want them to pick items one by one

To add controls to the settings toolbar, just change the visibility of these buttons. Please refer to SDCSparkScanView for the full list of parameters.