Skip to main content
Speed up SparkScan integration with Agent Skills

Install the Scandit plugin and use the /sparkscan-rn skill so that your AI coding agent can integrate, debug, and customize SparkScan on React Native following Scandit's recommended patterns. More info →

Run the following command in your project directory. It detects the supported coding agents you have installed and adds the Scandit plugin to each. Re-run it to update.

npx plugins add scandit/skills

Prefer to set it up yourself? Manual installation steps for each agent →

SparkScan settings reference

This page lists the SparkScan settings and view properties in React Native, with their defaults and allowed values as the API reference states them. A blank default means the API reference states none. For what the workflow settings do for your users, see How SparkScan works.

Options​

SparkScanSettings​

SparkScanSettings holds the scanning settings, such as the enabled symbologies. To change them on a running scanner, pass them to SparkScan.applySettings().

NameTypeDefaultValuesWhat it does
constructor(capturePresets)ConstructorSet<CapturePreset>, optionalCreates settings, optionally from presets that enable the matching symbologies and optimizations. Presets added in 8.3.0.
codeDuplicateFilternumber-2-2: depends on scanIntention. -1: not reported again until scanning stops. 0: no filtering. Greater than 0: the time before the same code is reported again.Filters out codes with the same symbology and data that are scanned again within the interval. If you keep the default and turn the selection mode On, SparkScan doesn't filter duplicates, so users can select the same barcode again.
enabledSymbologiesSymbology[]Empty: all symbologies are disabledRead-only. The enabled symbologies.
enableSymbology(symbology, enabled)MethodEnables or disables one symbology.
enableSymbologies(symbologies)MethodEnables a list of symbologies.
settingsForSymbology(symbology)MethodReturns the SymbologySettings of one symbology, for example to change its active symbol counts.
enabledCompositeTypesCompositeType[]The composite code types to scan. Added in 8.3.0.
enableSymbologiesForCompositeTypes(compositeTypes)MethodEnables the symbologies that the given composite types need. Added in 8.3.0.
batterySavingBatterySavingModeAutoOn, Off, AutoThe battery saving mode. Auto turns it on when battery use is higher than usual.
scanIntentionScanIntentionSmartSmart, ManualWhether SparkScan identifies the barcode the user intends to scan. It has no effect while selectionMode is On.
selectionModeSelectionModeAutoAuto, On, OffWhether users confirm the aimed barcode with the trigger button. Added in 8.5.0.
itemDefinitionsScanItemDefinition[] | nullConfigures the settings with the item-based scanning API. When set, enabledSymbologies is ignored. Beta. Added in 8.1.0.
setProperty(name, value)MethodSets a property that isn't part of the stable API yet.
getProperty(name)MethodReturns the value of a property set with setProperty().

SparkScanViewSettings​

SparkScanViewSettings sets the view's default look and behavior. Set them before you create the SparkScanView. Changes after that don't apply to the view.

NameTypeDefaultValuesWhat it does
scanningBehaviorSparkScanScanningBehaviorSingleSingle, ContinuousWhether users scan one barcode per trigger or keep scanning. Added in 8.7.0.
previewBehaviorSparkScanPreviewBehaviorDefaultDefault, PersistentWhether the mini preview hides or stays visible when the scanner isn't scanning. Added in 8.7.0.
holdToScanEnabledbooleantrueWhether users can keep scanning by holding the trigger button. Ignored while selectionMode is On.
triggerButtonCollapseTimeoutnumber5 secondsA negative value: neverThe time after which the trigger button collapses to its idle state.
inactiveStateTimeoutnumber10 secondsThe time after which scanning stops on its own.
defaultTorchStateTorchStateOffOn, Off, AutoThe torch state when the camera starts.
defaultCameraPositionCameraPositionWorldFacingWorldFacing, UserFacing, UnspecifiedThe camera to start with. Beta.
defaultMiniPreviewSizeSparkScanMiniPreviewSizeRegularRegular, ExpandedThe size of the mini preview when it first shows.
zoomFactorOutnumber1The camera zoom factor.
zoomFactorInnumber2The zoom factor after users tap the zoom switch control.
soundEnabledbooleantrueWhether the scan feedback plays a sound.
hapticEnabledbooleantrueWhether the scan feedback vibrates.
visualFeedbackEnabledbooleantrueWhether the screen flashes on scan.
hardwareTriggerEnabledbooleanWhether a hardware button starts scanning.
hardwareTriggerKeyCodenumber | nullnull: the dedicated button on XCover devices, or volume down on other devicesThe button that starts scanning. Used only when hardwareTriggerEnabled is true. Applies on Android only.
toastSettingsSparkScanToastSettingsThe toast messages the mini preview shows.
selectionModeCandidateBrushBrush | nullnull: the default brushThe brush that highlights candidate barcodes while selectionMode is Auto. Added in 8.5.0.
periscopeModeEnabledbooleanfalseMirrors the camera feed for a periscope device. iOS only. Added in 8.3.0.

SparkScanView properties​

You set these properties as props of the SparkScanView component, or on the view instance.

NameTypeDefaultValuesWhat it does
feedbackDelegateSparkScanFeedbackDelegate | nullDecides the feedback for each scanned barcode. Without a delegate, every scan gets the success feedback.
uiListenerSparkScanViewUiListener | nullGets called when users tap a toolbar button.
triggerButtonVisiblebooleantrueShows the trigger button.
triggerButtonImagestring | nullThe image in the trigger button.
triggerButtonCollapsedColorColor | nullThe background color of the collapsed trigger button.
triggerButtonExpandedColorColor | nullThe background color of the expanded trigger button.
triggerButtonAnimationColorColor | nullThe color of the pulsing animation around the trigger button while the scanner is active.
triggerButtonTintColorColor | nullThe tint color of the trigger button.
previewSizeControlVisiblebooleantrueShows the control that resizes the mini preview.
previewCloseControlVisiblebooleantrueShows the control that closes the mini preview.
torchControlVisiblebooleantrueShows the torch control. Hidden when defaultTorchState is Auto.
zoomSwitchControlVisiblebooleantrueShows the zoom switch control. Added in 8.4.0.
scanningBehaviorButtonVisiblebooleanfalseShows the toolbar button that switches between single and continuous scanning.
selectionModeButtonVisiblebooleanfalseShows the toolbar button that switches selectionMode between On and Off. Added in 8.5.0.
cameraSwitchButtonVisiblebooleanfalseShows the toolbar button that switches between the world-facing and user-facing cameras. Beta.
barcodeCountButtonVisiblebooleanfalseShows the toolbar button for MatrixScan Count.
barcodeFindButtonVisiblebooleanfalseShows the toolbar button for MatrixScan Find.
labelCaptureButtonVisiblebooleanfalseShows the toolbar button for Smart Label Capture.
toolbarBackgroundColorColor | nullnullThe background color of the settings toolbar.
toolbarIconActiveTintColorColor | nullnullThe color of active toolbar icons.
toolbarIconInactiveTintColorColor | nullnullThe color of inactive toolbar icons.

Framework differences​

In React Native, these options differ from the other SparkScan frameworks:

Next step​

Choosing which barcode types to scan