SparkScan View Settings

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

SparkScanViewSettings
class SparkScanViewSettings

Added in version 6.24.0

Warning

Changing the values of SparkScanViewSettings instance after the creation of SparkScanView does not result in applying the changed settings to the corresponding view.

constructor()
constructor()

Added in version 6.24.0

Constructs a new SparkScan view settings to use when creating an instance of the SparkScanView.

triggerButtonCollapseTimeout
triggerButtonCollapseTimeout: number

Added in version 6.24.0

The timeout to automatically switch to idle state. When set to negative value timeout is infinite.

Default is 5 seconds.

inactiveStateTimeout
inactiveStateTimeout: number

Added in version 6.24.0

The timeout to automatically stop capturing.

Default is 10 seconds.

defaultScanningMode
defaultScanningMode: SparkScanScanningMode

Added in version 6.24.0

Deprecated since version 8.5: Use SparkScanSettings.selectionMode instead. Will be removed in 9.0.

Migration mapping:

Legacy defaultScanningMode

New selectionMode

SparkScanScanningModeDefault

SelectionMode.Off

SparkScanScanningModeTarget

SelectionMode.On

Sets the default scanning mode of the view.

Default is SparkScanScanningModeDefault.

scanningBehavior
scanningBehavior: SparkScanScanningBehavior

Added in version 8.5.0

Whether the SparkScan view scans a single barcode per trigger or keeps scanning continuously while the trigger is held. Replaces the embedded scanningBehavior field on the deprecated defaultScanningMode.

Default is SparkScanScanningBehavior.Single.

previewBehavior
previewBehavior: SparkScanPreviewBehavior

Added in version 8.5.0

Whether the SparkScan preview returns to its idle state after a scan or stays expanded. Replaces the embedded previewBehavior field on the deprecated defaultScanningMode.

Default is SparkScanPreviewBehavior.Default.

defaultTorchState
defaultTorchState: TorchState

Added in version 6.24.0

Sets the default torch state of the camera.

Default is TorchState.Off.

soundEnabled
soundEnabled: boolean

Added in version 6.24.0

Indicates whether the feedback should have sound enabled.

Default is true.

hapticEnabled
hapticEnabled: boolean

Added in version 6.24.0

Indicates whether the feedback should have haptics enabled.

Default is true.

holdToScanEnabled
holdToScanEnabled: boolean

Added in version 6.24.0

Indicates whether to keep scanning as long as the scan button is pressed.

Default is true.

visualFeedbackEnabled
visualFeedbackEnabled: boolean

Added in version 6.24.0

Indicates whether the visual feedback on scan should be displayed.

Default is true.

toastSettings
toastSettings: SparkScanToastSettings

Added in version 6.24.0

Sets the toast settings. See SparkScanToastSettings for details.

smartSelectionCandidateBrush
smartSelectionCandidateBrush: Brush | null

Added in version 8.1.0

Sets the brush to be used for potential candidates when smart selection is active — that is, when the SparkScanSettings.selectionMode property is set to SelectionMode.Auto, or when the deprecated ScanIntention.SmartSelection is used. If null, the default brush will be used.

zoomFactorOut
zoomFactorOut: number

Added in version 6.24.0

The zoom factor to use for the camera.

Default is 1.

zoomFactorIn
zoomFactorIn: number

Added in version 6.24.0

The zoom factor to move to when the zoom switch control was tapped.

Default is 2.

defaultMiniPreviewSize
defaultMiniPreviewSize: SparkScanMiniPreviewSize

Added in version 7.0.0

Sets the default size of the mini preview.

Default is SparkScanMiniPreviewSize.Regular.

defaultCameraPosition
defaultCameraPosition: CameraPosition

Added in version 7.1.0

Sets the default camera position.

Default is CameraPosition.WorldFacing.

Note

This API is still in beta and may change in future versions of Scandit Data Capture SDK.