SparkScan View
Defined in 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.
- ISparkScanScanningMode
interface ISparkScanScanningMode
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 : ISparkScanScanningMode
Added in version 6.16.0
Target scanning mode. This is meant and optimized to scan codes further away.
- SparkScanScanningModeTarget()
SparkScanScanningModeTarget(SparkScanScanningBehavior scanningBehavior, SparkScanScanningPrecision scanningPrecision)
Added in version 6.16.0
Constructs a new target scanning mode with the provided capture mode and scanning precision.
- ScanningBehavior
SparkScanScanningBehavior ScanningBehavior { get; }
Added in version 6.16.0
The scanning mode provided in the constructor.
- ScanningPrecision
SparkScanScanningPrecision ScanningPrecision { get; }
Added in version 6.19.0
The scanning precision provided in the constructor.
- SparkScanScanningModeDefault
class SparkScanScanningModeDefault : ISparkScanScanningMode
Added in version 6.16.0
This is the standard scanning mode for SparkScan.
- SparkScanScanningModeDefault()
SparkScanScanningModeDefault(SparkScanScanningBehavior scanningBehavior, SparkScanScanningPrecision scanningPrecision)
Added in version 6.16.0
Constructs a new default scanning mode with the provided capture mode and scanning precision.
- ScanningBehavior
SparkScanScanningBehavior ScanningBehavior { get; }
Added in version 6.16.0
The scanning mode provided in the constructor.
- ScanningPrecision
SparkScanScanningPrecision ScanningPrecision { get; }
Added in version 6.19.0
The scanning precision provided in the constructor.
- SparkScanCoordinatorLayout
class SparkScanCoordinatorLayout
Added in version 6.16.0
SparkScanCoordinatorLayout is a FrameLayout.
SparkScanCoordinatorLayout is intended to be used as a container of your layout and where the SparkScanView will be used.
- SparkScanCoordinatorLayout()
SparkScanCoordinatorLayout(Context context)
Added in version 6.16.0
Public constructor of the SparkScanCoordinatorLayout.
- SparkScanCoordinatorLayout()
SparkScanCoordinatorLayout(Context context, IAttributeSet attrs)
Added in version 6.16.0
Public constructor of the SparkScanCoordinatorLayout.
- SparkScanCoordinatorLayout()
SparkScanCoordinatorLayout(Context context, IAttributeSet attrs,
int
defStyleAttr)Added in version 6.16.0
Public constructor of the SparkScanCoordinatorLayout.
<com.scandit.datacapture.barcode.spark.ui.SparkScanCoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> // Your layout goes here </com.scandit.datacapture.barcode.spark.ui.SparkScanCoordinatorLayout>
- SparkScanViewEventArgs
class SparkScanViewEventArgs : EventArgs
Added in version 6.16.0
Provides data for the SparkScanView.BarcodeCountButtonTapped and SparkScanView.FastFindButtonTapped events.
- SparkScanViewEventArgs()
SparkScanViewEventArgs(SparkScanView view)
Added in version 6.16.0
- View
SparkScanView View { get; }
Added in version 6.16.0
- SparkScanView
class SparkScanView : RelativeLayout
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
- OnPause()
void
OnPause()Added in version 6.16.0
Function to call on Fragment/Activity OnPause callback. You have to call this for the correct functioning of the SparkScanView.
protected override void OnPause() { base.OnPause(); sparkScanView.OnPause() }
- OnResume()
void
OnResume()Added in version 6.16.0
Function to call on Fragment/Activity OnResume callback. You have to call this for the correct functioning of the SparkScanView.
protected override void OnResume() { base.OnResume(); sparkScanView.OnResume() }
- EmitFeedback()
void
EmitFeedback(SparkScanViewFeedback feedback)Added in version 6.16.0
Displays the SparkScanViewFeedback feedback and emits a SparkScanFeedback based on the feedback type.
- HardwareTriggerSupported
static
bool
HardwareTriggerSupported { get; }Added in version 6.16.0
Returns whether the device supports listening for hardware button events. This is true for devices with api >= 28.
- Create()
static SparkScanView Create(View parentView, DataCaptureContext context, SparkScan sparkScan, SparkScanViewSettings settings)
Added in version 6.16.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.
SparkScanCoordinatorLayout container = this.FindViewById<SparkScanCoordinatorLayout>(Resource.Id.spark_scan_coordinator); var sparkScanView = SparkScanView.Create(parentView: container, context: context, sparkScan: sparkScan, settings: viewSettings);
- StartScanning()
void
StartScanning()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()
void
PauseScanning()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.
- ShowToast()
void
ShowToast(string
text)Added in version 6.18.0
Shows a toast with text inside the capture button.
- ShouldShowScanAreaGuides
bool
ShouldShowScanAreaGuides { get;set; }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 { get;set; }
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.
- BarcodeCountButtonTapped
event EventHandler<SparkScanViewEventArgs> BarcodeCountButtonTapped
Added in version 6.16.0
Invoked whenever a barcode count button is tapped from the toolbar.
- FastFindButtonTapped
event EventHandler<SparkScanViewEventArgs> FastFindButtonTapped
Added in version 6.16.0
Invoked whenever a fast find button is tapped from the toolbar.
- BarcodeCountButtonVisible
bool
BarcodeCountButtonVisible { get;set; }Added in version 6.16.0
Indicates whether the barcode count button should be shown to the user.
Default is false.
- FastFindButtonVisible
bool
FastFindButtonVisible { get;set; }Added in version 6.16.0
Indicates whether the fast find button should be shown to the user.
Default is false.
- TargetModeButtonVisible
bool
TargetModeButtonVisible { get;set; }Added in version 6.16.0
Indicates whether the target mode button should be shown to the user.
Default is true.
- ScanningBehaviorButtonVisible
bool
ScanningBehaviorButtonVisible { get;set; }Added in version 6.16.0
Indicates whether the scanning behavior button should be shown to the user.
Default is true.
- TorchButtonVisible
bool
TorchButtonVisible { get;set; }Added in version 6.16.0
Indicates whether the torch button should be shown to the user.
Default is true.
- SoundModeButtonVisible
bool
SoundModeButtonVisible { get;set; }Added in version 6.16.0
Indicates whether the enable sound button should be shown to the user.
Default is true.
- HapticModeButtonVisible
bool
HapticModeButtonVisible { get;set; }Added in version 6.16.0
Indicates whether the enable haptic button should be shown to the user.
Default is true.
- HandModeButtonVisible
bool
HandModeButtonVisible { get;set; }Added in version 6.16.0
Indicates whether the hand mode button should be shown to the user.
Default is true.
- ZoomSwitchControlVisible
bool
ZoomSwitchControlVisible { get;set; }Added in version 6.18.0
Indicates whether the zoom switch control should be shown to the user.
Default is true.
- StopCapturingText
string
StopCapturingText { get;set; }Added in version 6.16.0
Sets the default text to display in the button for the stop capturing action.
Default is null.
- StartCapturingText
string
StartCapturingText { get;set; }Added in version 6.16.0
Sets the default text to display in the button for the start capturing action.
Default is null.
- ResumeCapturingText
string
ResumeCapturingText { get;set; }Added in version 6.16.0
Sets the default text to display in the button for the resume capturing action.
Default is null.
- ScanningCapturingText
string
ScanningCapturingText { get;set; }Added in version 6.16.0
Sets the default text to display in the button when scanning in SparkScanScanningBehavior.Single.
Default is null.
- CaptureButtonBackgroundColor
int
CaptureButtonBackgroundColor { get;set; }Added in version 6.16.0
Sets the background color of the capture button.
Default is null.
- CaptureButtonActiveBackgroundColor
int
CaptureButtonActiveBackgroundColor { get;set; }Added in version 6.16.0
Sets the background color of the capture button when scanning.
Default is null.
- CaptureButtonTintColor
int
CaptureButtonTintColor { get;set; }Added in version 6.16.0
Sets the capture button icon and text color.
Default is null.
- ToolbarBackgroundColor
int
ToolbarBackgroundColor { get;set; }Added in version 6.16.0
Sets the toolbar background color.
Default is null.
- ToolbarIconActiveTintColor
int
ToolbarIconActiveTintColor { get;set; }Added in version 6.16.0
Sets the toolbar icon active color.
Default is null.
- ToolbarIconInactiveTintColor
int
ToolbarIconInactiveTintColor { get;set; }Added in version 6.16.0
Sets the toolbar icon inactive color.
Default is null.
- TargetModeHintText
string
TargetModeHintText { get;set; }Added in version 6.19.0
Sets the target mode hint text.
Default is null.
- ShouldShowTargetModeHint
bool
ShouldShowTargetModeHint { get;set; }Added in version 6.19.0
Indicates whether hints in target mode should be shown to the user.
Default is true.