SparkScan View

Defined under the namespace Scandit.Datacapture.Barcode.Spark.Ui

SparkScanScanningBehavior

Added in version 6.24.0

The capture mode type of the SparkScanView.

Single

Added in version 6.24.0

Barcode capturing session is stopped after each scan.

Continuous

Added in version 6.24.0

Keeps the barcode capturing session active for longer time.

SparkScanPreviewBehavior

Added in version 6.24.0

The preview behavior type of the SparkScanView.

Default

Added in version 6.24.0

After a scan with scanning behavior SparkScanScanningBehavior.Single, or stopping scanning with scanning behavior SparkScanScanningBehavior.Continuous, camera moves to standby state and preview is hidden for maximum efficiency.

Persistent

Added in version 6.24.0

After a scan with scanning behavior SparkScanScanningBehavior.Single, or stopping scanning with scanning behavior SparkScanScanningBehavior.Continuous, camera stays active and preview is visible for maximum precision.

SparkScanViewHandMode

Added in version 6.24.0

The hand mode type of the SparkScanView.

Right

Added in version 6.24.0

Optimizes the layout for right-hand use of the SparkScanView.

Left

Added in version 6.24.0

Optimizes the layout for left-hand use of the SparkScanView.

SparkScanScanningMode
abstract class SparkScanScanningMode

Added in version 6.24.0

The base class for setting a default scanning mode to SparkScanViewSettings. Can be either SparkScanScanningModeTarget or SparkScanScanningModeDefault.

constructor(scanningBehavior, previewBehavior)
constructor(scanningBehavior: SparkScanScanningBehavior,
        previewBehavior: SparkScanPreviewBehavior)

Added in version 6.24.0

Constructs a new target scanning mode with the provided scanning behavior and preview behavior.

scanningBehavior
readonly scanningBehavior: SparkScanScanningBehavior

Added in version 6.24.0

The scanning behavior provided in the constructor.

previewBehavior
readonly previewBehavior: SparkScanPreviewBehavior

Added in version 6.24.0

The preview behavior provided in the constructor.

SparkScanScanningModeDefault
class SparkScanScanningModeDefault : SparkScanScanningMode

Added in version 6.24.0

SparkScanScanningModeTarget
class SparkScanScanningModeTarget : SparkScanScanningMode

Added in version 6.24.0

SparkScanView
class SparkScanView : ScanditHTMLElement

Added in version 6.24.0

SparkScan comes with a ready-to-use UI and scanning modes that are purpose-built to tackle high-volume scanning at close range. The SparkScanView integrates with any app without requiring app redesign or customization. It includes:

  • camera preview screen

  • large-sized scan button

  • quick access toolbar to adjust scanning settings

feedbackDelegate
feedbackDelegate: SparkScanFeedbackDelegate

Added in version 6.25.0

Sets the feedback delegate. If no delegate is set, the default SparkScanBarcodeFeedback.Success feedback is emitted.

forElement(element, context, sparkScan, sparkScanViewSettings)
static forElement(element: Element,
        context: DataCaptureContext,
        sparkScan: SparkScan,
        sparkScanViewSettings?: SparkScanViewSettings): SparkScanView

Added in version 6.24.0

Constructs a new SparkScan view and adds it to the provided parentView. When the settings are provided, those will be used to set the default behaviour and look of the view.

prepareScanning()
prepareScanning(): Promise<void>

Added in version 6.24.0

Method to call for preparing the mode for scanning. For instance, it can be called when the node containing SparkScanView is attached to the DOM.

stopScanning()
stopScanning(): Promise<void>

Added in version 6.24.0

Method to call for stopping the mode. For instance, it can be called when the SparkScanView is about to be detached from the DOM.

startScanning()
startScanning(): Promise<void>

Added in version 6.24.0

Starts the scanning process. You can call this method if you want to trigger the scanning process without any user interaction.

pauseScanning()
pauseScanning(): Promise<void>

Added in version 6.24.0

Pauses the scanning process. You can call this method if you want to trigger pausing the scanning process without any user interaction.

showToast(message)
showToast(message: string): void

Added in version 6.24.0

Shows a toast with text inside the mini preview.

targetModeButtonVisible
targetModeButtonVisible: boolean

Added in version 6.24.0

Indicates whether the target mode button should be shown to the user.

Default is true.

scanningBehaviorButtonVisible
scanningBehaviorButtonVisible: boolean

Added in version 6.24.0

Indicates whether the scanning behavior button should be shown to the user.

Default is false.

torchButtonVisible
torchButtonVisible: boolean

Added in version 6.24.0

Indicates whether the torch button should be shown to the user.

Default is true.

soundModeButtonVisible
soundModeButtonVisible: boolean

Added in version 6.24.0

Indicates whether the enable sound button should be shown to the user.

Default is false.

Deprecated since version 6.26: This property is deprecated as sound mode button will be removed in the future.

hapticModeButtonVisible
hapticModeButtonVisible: boolean

Added in version 6.24.0

Indicates whether the enable haptic button should be shown to the user.

Default is false.

Deprecated since version 6.26: This property is deprecated as haptic mode button will be removed in the future.

handModeButtonVisible
handModeButtonVisible: boolean

Added in version 6.24.0

Indicates whether the hand mode button should be shown to the user.

Default is false.

zoomSwitchControlVisible
zoomSwitchControlVisible: boolean

Added in version 6.24.0

Indicates whether the zoom switch control should be shown to the user.

Default is true.

previewSizeControlVisible
previewSizeControlVisible: boolean

Added in version 6.24.0

Indicates whether the mini preview size control should be shown to the user.

Default is true.

stopCapturingText
stopCapturingText?: string

Added in version 6.24.0

Sets the default text to display in the button for the stop capturing action.

Default is null.

startCapturingText
startCapturingText?: string

Added in version 6.24.0

Sets the default text to display in the button for the start capturing action.

Default is null.

resumeCapturingText
resumeCapturingText?: string

Added in version 6.24.0

Sets the default text to display in the button for the resume capturing action.

Default is null.

scanningCapturingText
scanningCapturingText?: string

Added in version 6.24.0

Sets the default text to display in the button when scanning in SparkScanScanningBehavior.Single.

Default is null.

captureButtonBackgroundColor
captureButtonBackgroundColor?: Color

Added in version 6.24.0

Sets the background color of the capture button.

Default is null.

captureButtonActiveBackgroundColor
captureButtonActiveBackgroundColor?: Color

Added in version 6.24.0

Sets the background color of the capture button when scanning.

Default is null.

captureButtonTintColor
captureButtonTintColor?: Color

Added in version 6.24.0

Sets the capture button icon and text color.

Default is null.

toolbarBackgroundColor
toolbarBackgroundColor?: Color

Added in version 6.24.0

Sets the toolbar background color.

Default is null.

toolbarIconActiveTintColor
toolbarIconActiveTintColor?: Color

Added in version 6.24.0

Sets the toolbar icon active color.

Default is null.

toolbarIconInactiveTintColor
toolbarIconInactiveTintColor?: Color

Added in version 6.24.0

Sets the toolbar icon inactive color.

Default is null.

didChangeScanningMode(scanningMode)
didChangeScanningMode?: (scanningMode: SparkScanScanningMode) => void

Added in version 6.24.0

Callback method that will be called when the currently used SparkScanScanningMode changes.