SparkScan View
Defined under the namespace Scandit.Datacapture.Barcode.Spark.Ui
- SparkScanScanningBehavior
Added in version 6.16.0
The capture mode type of the SparkScanView.
- Single
Added in version 6.16.0
Barcode capturing session is stopped after each scan.
- Continuous
Added in version 6.16.0
Keeps the barcode capturing session active for longer time.
- SparkScanViewHandMode
Added in version 6.16.0
The hand mode type of the SparkScanView.
- Right
Added in version 6.16.0
Optimizes the layout for right-hand use of the SparkScanView.
- Left
Added in version 6.16.0
Optimizes the layout for left-hand use of the SparkScanView.
- SparkScanScanningPrecision
Added in version 6.19.0
The scanning precision type of the SparkScanView.
- Default
Added in version 6.19.0
Default precision. Depending on the configured scanning mode and behavior, it results in the following behaviors:
Tapping the trigger button starts the camera and the scanning process.
A barcode is scanned as soon as it is visible on the camera frame.
After a successful scan, the scanning process is stopped, and the camera is frozen on the last frame.
Tapping the trigger button starts the camera and the scanning process.
A barcode is scanned after pointing the viewfinder at it for a short time.
After a successful scan, the scanning process is stopped, and the camera is frozen on the last frame.
Tapping the trigger button starts the camera and the scanning process.
A barcode is scanned as soon as it is visible on the camera frame.
Camera and scanning process keep running until the user taps the trigger button, or the SparkScanViewSettings.continuousCaptureTimeout expires.
Tapping the trigger button starts the camera and the scanning process.
A barcode is scanned after pointing the viewfinder at it for a short time.
Camera and scanning process keep running until the user taps the trigger button, or the SparkScanViewSettings.continuousCaptureTimeout expires.
- Accurate
Added in version 6.19.0
Accurate precision. Depending on the configured scanning mode and behavior, it results in the following behaviors:
Expanding the trigger button starts the camera, and tapping it starts the scanning process.
A barcode is scanned after pointing the viewfinder at it.
After a successful scan, the scanning process is stopped, but the camera keeps running.
Tapping the trigger button starts the camera and the scanning process.
A barcode is scanned after pointing the viewfinder at it and tapping the trigger button.
Camera and scanning process keep running until the trigger button is collapsed.
Expanding the trigger button starts the camera, and tapping it starts the scanning process.
A barcode is scanned after pointing the viewfinder at it.
Camera and scanning process keep running until the user taps the trigger button, or the SparkScanViewSettings.continuousCaptureTimeout expires.
Expanding the trigger button starts the camera, and tapping it starts the scanning process.
A barcode is scanned after pointing the viewfinder at it for a short time.
Camera and scanning process keep running until the user taps the trigger button, or the SparkScanViewSettings.continuousCaptureTimeout expires.
- SparkScanViewUiListener
interface SparkScanViewUiListener
Added in version 6.16.0
- onFastFindButtonTappedIn(view)
onFastFindButtonTappedIn?(view: SparkScanView):
void
Added in version 6.16.0
Callback method that can be used to define an action that should be performed when fast find button is tapped from the toolbar. Called from the main thread.
- onBarcodeCountButtonTappedIn(view)
onBarcodeCountButtonTappedIn?(view: SparkScanView):
void
Added in version 6.16.0
Callback method that can be used to define an action that should be performed when barcode count button is tapped from the toolbar. Called from the main thread.
- SparkScanScanningMode
interface SparkScanScanningMode
Added in version 6.16.0
The base class for setting a default scanning mode to SparkScanViewSettings. Can be either SparkScanScanningModeTarget or SparkScanScanningModeDefault.
- SparkScanScanningModeTarget
class SparkScanScanningModeTarget : SparkScanScanningMode
Added in version 6.16.0
Target scanning mode. This is meant and optimized to scan codes further away.
- constructor(scanningBehavior)
constructor(scanningBehavior: SparkScanScanningBehavior)
Added in version 6.16.0
Constructs a new target scanning mode with the provided capture mode.
- scanningBehavior
get scanningBehavior(): SparkScanScanningBehavior
Added in version 6.16.0
The scanning mode provided in the constructor.
- SparkScanScanningModeDefault
class SparkScanScanningModeDefault : SparkScanScanningMode
Added in version 6.16.0
This is the standard scanning mode for SparkScan.
- constructor(scanningBehavior)
constructor(scanningBehavior: SparkScanScanningBehavior)
Added in version 6.16.0
Constructs a new default scanning mode with the provided capture mode.
- scanningBehavior
get scanningBehavior(): SparkScanScanningBehavior
Added in version 6.16.0
The scanning mode provided in the constructor.
- SparkScanView
class SparkScanView
Added in version 6.16.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
- emitFeedback(feedback)
emitFeedback(feedback: SparkScanViewFeedback):
void
Added in version 6.16.0
Displays the SparkScanViewFeedback feedback and emits a SparkScanFeedback based on the feedback type.
- prepareScanning()
prepareScanning():
void
Added in version 6.16.1
Method to call for preparing the mode for scanning. For instance, it can be called when the component containing SparkScanView is presented (i.e., Component’s componentDidMount).
- stopScanning()
stopScanning():
void
Added in version 6.16.1
Method to call for stopping the mode. For instance, it can be called when the component containing SparkScanView is about to disappear (i.e., Component’s componentWillUnmount).
- startScanning()
startScanning():
void
Added in version 6.16.0
Starts the scanning process. You can call this method if you want to trigger the scanning process without any user interaction.
- pauseScanning()
pauseScanning():
void
Added in version 6.16.0
Pauses the scanning process. You can call this method if you want to trigger pausing the scanning process without any user interaction.
- shouldShowScanAreaGuides
shouldShowScanAreaGuides: boolean
Added in version 6.16.0
Whether to show scan area guides on top of the preview. This property is useful during development to visualize the current scan areas on screen. It is not meant to be used for production. By default this property is false.
- brush
brush: Brush
Added in version 6.16.0
The brush used for visualizing captured barcodes in the UI. To turn off drawing of locations, set the brush to use both a transparent fill and stroke color. By default, the brush has a transparent fill color, a white stroke color, and a stroke width of 1.
- defaultBrush()
static get defaultBrush(): Brush
Added in version 6.16.0
Returns the default brush used by the overlay.
- uiListener
uiListener: SparkScanViewUiListener | null
Added in version 6.16.0
Sets the listener which is called whenever a fast find button or barcode count button is tapped from the toolbar.
- barcodeCountButtonVisible
barcodeCountButtonVisible: boolean
Added in version 6.16.0
Indicates whether the barcode count button should be shown to the user.
Default is false.
- fastFindButtonVisible
fastFindButtonVisible: boolean
Added in version 6.16.0
Indicates whether the fast find button should be shown to the user.
Default is false.
- targetModeButtonVisible
targetModeButtonVisible: boolean
Added in version 6.16.0
Indicates whether the target mode button should be shown to the user.
Default is true.
- scanningBehaviorButtonVisible
scanningBehaviorButtonVisible: boolean
Added in version 6.16.0
Indicates whether the scanning behavior button should be shown to the user.
Default is true.
- torchButtonVisible
torchButtonVisible: boolean
Added in version 6.16.0
Indicates whether the torch button should be shown to the user.
Default is true.
- soundModeButtonVisible
soundModeButtonVisible: boolean
Added in version 6.16.0
Indicates whether the enable sound button should be shown to the user.
Default is true.
- hapticModeButtonVisible
hapticModeButtonVisible: boolean
Added in version 6.16.0
Indicates whether the enable haptic button should be shown to the user.
Default is true.
- handModeButtonVisible
handModeButtonVisible: boolean
Added in version 6.16.0
Indicates whether the hand mode button should be shown to the user.
Default is true.
- stopCapturingText
stopCapturingText: string | null
Added in version 6.16.0
Sets the default text to display in the button for the stop capturing action.
Default is null.
- startCapturingText
startCapturingText: string | null
Added in version 6.16.0
Sets the default text to display in the button for the start capturing action.
Default is null.
- resumeCapturingText
resumeCapturingText: string | null
Added in version 6.16.0
Sets the default text to display in the button for the resume capturing action.
Default is null.
- scanningCapturingText
scanningCapturingText: string | null
Added in version 6.16.0
Sets the default text to display in the button when scanning in SparkScanScanningBehavior.Single.
Default is null.
- captureButtonBackgroundColor
captureButtonBackgroundColor: Color | null
Added in version 6.16.0
Sets the background color of the capture button.
Default is null.
- captureButtonActiveBackgroundColor
captureButtonActiveBackgroundColor: Color | null
Added in version 6.16.0
Sets the background color of the capture button when scanning.
Default is null.
- captureButtonTintColor
captureButtonTintColor: Color | null
Added in version 6.16.0
Sets the capture button icon and text color.
Default is null.
- toolbarBackgroundColor
toolbarBackgroundColor: Color | null
Added in version 6.16.0
Sets the toolbar background color.
Default is null.
- toolbarIconActiveTintColor
toolbarIconActiveTintColor: Color | null
Added in version 6.16.0
Sets the toolbar icon active color.
Default is null.
- toolbarIconInactiveTintColor
toolbarIconInactiveTintColor: Color | null
Added in version 6.16.0
Sets the toolbar icon inactive color.
Default is null.