SparkScan View Settings
Defined in package com.scandit.datacapture.barcode.spark.ui
- SparkScanViewSettings
class SparkScanViewSettingsAdded in version 8.6.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.
- sparkScanViewSettings()
fun SparkScanViewSettings.sparkScanViewSettings(): SparkScanViewSettings
Added in version 8.6.0
Constructs a new SparkScan view settings to use when creating an instance of the SparkScanView.
- triggerButtonCollapseTimeout
var triggerButtonCollapseTimeout: Long
Added in version 8.6.0
The timeout to automatically switch to idle state. When set to negative value timeout is infinite.
Default is 5 seconds.
- inactiveStateTimeout
var inactiveStateTimeout: Long
Added in version 8.6.0
The timeout to automatically stop capturing.
Default is 10 seconds.
- scanningBehavior
var scanningBehavior: SparkScanScanningBehavior
Added in version 8.6.0
Default is SparkScanScanningBehavior.SINGLE.
- previewBehavior
var previewBehavior: SparkScanPreviewBehavior
Added in version 8.6.0
Whether the SparkScan preview returns to its idle state after a scan or stays expanded.
Default is SparkScanPreviewBehavior.DEFAULT.
- defaultTorchState
var defaultTorchState: TorchState
Added in version 8.6.0
Sets the default torch state of the camera.
Default is TorchState.OFF.
- soundEnabled
var soundEnabled:
BooleanAdded in version 8.6.0
Indicates whether the feedback should have sound enabled.
Default is true.
- hapticEnabled
var hapticEnabled:
BooleanAdded in version 8.6.0
Indicates whether the feedback should have haptics enabled.
Default is true.
- holdToScanEnabled
var holdToScanEnabled:
BooleanAdded in version 8.6.0
Indicates whether to keep scanning as long as the scan button is pressed.
Default is true.
Note
Hold-to-scan is automatically disabled by the SDK when SparkScanSettings.selectionMode is set to SelectionMode.ON, since that mode requires explicit user confirmation for every scan. The value of this property is ignored while
SelectionMode.Onis active.
- hardwareTriggerEnabled
var hardwareTriggerEnabled:
BooleanAdded in version 8.6.0
- visualFeedbackEnabled
var visualFeedbackEnabled:
BooleanAdded in version 8.6.0
Indicates whether the visual feedback on scan should be displayed.
Default is true.
- toastSettings
var toastSettings: SparkScanToastSettings
Added in version 8.6.0
Sets the toast settings. See SparkScanToastSettings for details.
- selectionModeCandidateBrush
var selectionModeCandidateBrush: Brush?
Added in version 8.6.0
Sets the brush to be used for potential candidates when automatic selection is active — that is, when the SparkScanSettings.selectionMode property is set to SelectionMode.AUTO, or when the deprecated
ScanIntention.SmartSelectionis used. If null, the default brush will be used.The brush’s stroke colour is also used for the aimer’s dwell-progress indicator, falling back to the fill colour when the stroke is transparent.
- zoomFactorOut
var zoomFactorOut:
FloatAdded in version 8.6.0
The zoom factor to use for the camera.
Default is 1.
- zoomFactorIn
var zoomFactorIn:
FloatAdded in version 8.6.0
The zoom factor to move to when the zoom switch control was tapped.
Default is 2.
- defaultMiniPreviewSize
var defaultMiniPreviewSize: SparkScanMiniPreviewSize
Added in version 8.6.0
Sets the default size of the mini preview.
Default is SparkScanMiniPreviewSize.REGULAR.
- defaultCameraPosition
var defaultCameraPosition: CameraPosition
Added in version 8.6.0
Sets the default camera position.
Default is CameraPosition.WORLD_FACING.
Note
This API is still in beta and may change in future versions of Scandit Data Capture SDK.
- periscopeModeEnabled
var periscopeModeEnabled:
BooleanAdded in version 8.6.0
Controls the mirroring of the camera feed to support the use of a periscope device.
Default is false.
Note
This property only has an effect on iOS. It does not affect the camera feed on Android.