Barcode Sequence View

Defined in package com.scandit.datacapture.barcode.sequence.ui

BarcodeSequenceState

Added in version 8.7.0

The possible states of the BarcodeSequenceView.

INITIALIZED

Added in version 8.7.0

The view has been initialized and is ready to start sequencing.

INITIALIZED_WITH_WRONG_ORIENTATION

Added in version 8.7.0

The view has been initialized but not ready to begin sequencing because the device is held in the wrong orientation.

INITIALIZED_WITH_DEVICE_NOT_FACING_SHELF

Added in version 8.7.0

The view has been initialized but not ready to begin sequencing because the device is not held facing the shelf.

SEQUENCING

Added in version 8.7.0

The view is actively sequencing.

PAUSED

Added in version 8.7.0

The sequencing process has been paused.

PAUSED_DUE_TO_INACTIVITY

Added in version 8.7.0

The sequencing process has been paused automatically due to user inactivity.

PAUSED_DUE_TO_ORIENTATION_CHANGE

Added in version 8.7.0

The sequencing process has been paused due to the device being held in the wrong orientation.

PAUSED_DUE_TO_DEVICE_NOT_FACING_SHELF

Added in version 8.7.0

The sequencing process has been paused due to the device not being held facing the shelf.

STOPPED

Added in version 8.7.0

The sequencing process has been stopped.

ERROR

Added in version 8.7.0

The sequencing process encountered an error. The error will be displayed on the view.

BarcodeSequenceViewUiListener
interface BarcodeSequenceViewUiListener

Added in version 8.7.0

onNextButtonTapped(view, sequencedShelfModule)
fun onNextButtonTapped(view: BarcodeSequenceView,
        sequencedShelfModule: SequencedShelfModule?)

Added in version 8.7.0

Callback method that is called when the next button is tapped in the view with the sequenced shelf module. Module may be null.

onViewListButtonTapped(view, sequencedShelfModule)
fun onViewListButtonTapped(view: BarcodeSequenceView,
        sequencedShelfModule: SequencedShelfModule?)

Added in version 8.7.0

Callback method that is called when the view list button is tapped in the view with the sequenced shelf module. Module may be null.

onStateChanged(view, state)
fun onStateChanged(view: BarcodeSequenceView,
        state: BarcodeSequenceState)

Added in version 8.7.0

Callback method that is called when the BarcodeSequenceView state changes.

BarcodeSequenceViewState
class BarcodeSequenceViewState

Added in version 8.7.0

Compose Multiplatform state holder that drives imperative operations on a BarcodeSequenceView composable. Obtain one with rememberBarcodeSequenceViewState() and pass it to the composable. Calling an operation before the view is mounted throws.

BarcodeSequenceViewState()
BarcodeSequenceViewState()

Added in version 8.7.0

Creates a new state holder.

start()
fun start()

Added in version 8.7.0

Starts the camera and re-initializes the view. Call it when the host returns to the foreground. It does not begin the sequencing process; that starts on the next shutter tap.

pause()
fun pause()

Added in version 8.7.0

Pauses the sequencing process; call start() to bring the view back to its initialized state. On Android this also releases the camera.

stop()
fun stop()

Added in version 8.7.0

Tears the view down and releases its resources. Terminal on Android.

reset()
fun reset()

Added in version 8.7.0

Re-initializes sequencing for a fresh shelf.

BarcodeSequenceView
class BarcodeSequenceView

Added in version 8.7.0

Barcode Sequence comes with a ready-to-use UI that allows highlighting barcodes and trays and building a shelf module. The BarcodeSequenceView integrates with any app in just a few lines of code.

soundEnabled
var soundEnabled: Boolean

Added in version 8.7.0

Indicates whether the feedback should have sound enabled. Can be changed while the view is in use.

Default is true.

hapticEnabled
var hapticEnabled: Boolean

Added in version 8.7.0

Indicates whether the feedback should have haptics enabled. Can be changed while the view is in use.

Default is true.

shouldShowInitialGuidance
var shouldShowInitialGuidance: Boolean

Added in version 8.7.0

Indicates whether an initial guidance UI should be presented when the view starts. Disabling the setting right after creating the view prevents the guidance from appearing; disabling it while the guidance is visible hides it. Re-enabling it after the guidance has been dismissed has no effect.

Default is true.

trayIndicatorLineColor
var trayIndicatorLineColor: Color

Added in version 8.7.0

Color used for the tray indicator line. Can be changed while the view is in use; visible tray indicators are updated immediately.

Default is #0062FF.

trayIndicatorLineSize
var trayIndicatorLineSize: Float

Added in version 8.7.0

The thickness of the tray indicator line in device-independent pixels. Can be changed while the view is in use; visible tray indicators are updated immediately.

Default is 4.

trayIndicatorText
var trayIndicatorText: String

Added in version 8.7.0

The label text for the tray indicator. The value should contain a placeholder like "Row %d". Can be changed while the view is in use; visible tray indicators are updated immediately.

Default is "Row %d".

highlightBrush
var highlightBrush: Brush

Added in version 8.7.0

Brush used to render highlights for tracked and sequenced barcodes. Can be changed while the view is in use; visible highlights are updated immediately.

Default is a brush with #0062FF fill color, #FFFFFF stroke color and 2f stroke width.

highlightTextColor
var highlightTextColor: Color

Added in version 8.7.0

Text color used for highlight labels. Can be changed while the view is in use; visible highlights are updated immediately.

Default is #FFFFFF.

uiListener
var uiListener: BarcodeSequenceViewUiListener?

Added in version 8.7.0

Sets the listener which is called whenever buttons are tapped in the view.

state
val state: BarcodeSequenceState

Added in version 8.7.0

The current state of the BarcodeSequenceView.

sequencedShelfModule
val sequencedShelfModule: SequencedShelfModule?

Added in version 8.7.0

The current sequenced shelf module.

Note

For performance reasons, this property is updated only when the sequencing process is paused, and should be accessed only after pausing.

shouldShowTorchControl
var shouldShowTorchControl: Boolean

Added in version 8.7.0

Indicates whether the torch control button should be shown.

Default is true.

torchControlPosition
var torchControlPosition: Anchor

Added in version 8.7.0

Updates the position of the torch control button.

Default is Anchor.TOP_LEFT.

initialGuidanceTitleText
var initialGuidanceTitleText: String

Added in version 8.7.0

The title text for the initial guidance tutorial dialog.

Default is “Scan all codes in a shelf”.

initialGuidanceDescriptionText
var initialGuidanceDescriptionText: String

Added in version 8.7.0

The description text for the initial guidance tutorial dialog.

Default is “For best results, use landscape mode and scan each row from left to right pausing in between rows.”.

initialGuidanceButtonText
var initialGuidanceButtonText: String

Added in version 8.7.0

The button text for the initial guidance tutorial dialog.

Default is “OK”.

rotateDeviceToCaptureText
var rotateDeviceToCaptureText: String

Added in version 8.7.0

pointShelfToCaptureText
var pointShelfToCaptureText: String

Added in version 8.7.0

The text displayed in the rotation prompt when the device is not facing the shelf and needs to be rotated towards it for sequencing.

Default is “Point the shelf to capture”.

shouldShowViewListButton
var shouldShowViewListButton: Boolean

Added in version 8.7.0

Whether the View List button is shown.

Default is true.

shouldShowNextButton
var shouldShowNextButton: Boolean

Added in version 8.7.0

Whether the Next button is shown.

Default is true.

shouldShowRedoButton
var shouldShowRedoButton: Boolean

Added in version 8.7.0

Whether the Redo button is shown.

Default is true.

shouldShowShutterButton
var shouldShowShutterButton: Boolean

Added in version 8.7.0

Whether the shutter button is shown.

Default is true.

shouldShowTrayIndicatorText
var shouldShowTrayIndicatorText: Boolean

Added in version 8.7.0

Whether the per-row tray indicator label (for example “Row 1”) is drawn on top of each captured tray. The tray indicator line itself is unaffected.

Default is true.

nextButtonText
var nextButtonText: String

Added in version 8.7.0

The text for the Next button.

Default is “Next”.

redoButtonText
var redoButtonText: String

Added in version 8.7.0

The text for the Redo button.

Default is “Redo”.

viewListButtonText
var viewListButtonText: String

Added in version 8.7.0

The text for the View List button.

Default is “View List”.

redoShelfDialogTitleText
var redoShelfDialogTitleText: String

Added in version 8.7.0

The title text for the redo confirmation dialog.

Default is “Redo Shelf”.

redoShelfDialogDescriptionText
var redoShelfDialogDescriptionText: String

Added in version 8.7.0

The description text for the redo confirmation dialog.

Default is “Your current capture will be cleared. Do you want to start a new capture?”.

redoShelfDialogAcceptButtonText
var redoShelfDialogAcceptButtonText: String

Added in version 8.7.0

The accept button text for the redo confirmation dialog.

Default is “Redo”.

redoShelfDialogCancelButtonText
var redoShelfDialogCancelButtonText: String

Added in version 8.7.0

The cancel button text for the redo confirmation dialog.

Default is “Cancel”.

removeBarcodeButtonText
var removeBarcodeButtonText: String

Added in version 8.7.0

The text for the remove barcode button in popover annotation.

Default is “Remove”.

addBarcodeButtonText
var addBarcodeButtonText: String

Added in version 8.7.0

The text for the add barcode button in popover annotation.

Default is “Add”.

logoStyle
var logoStyle: LogoStyle

Added in version 8.7.0

The style of the logo, either the extended “Scanning By Scandit” or the minimal “Scandit”.

Default is LogoStyle.EXTENDED.

logoAnchor
var logoAnchor: Anchor

Added in version 8.7.0

The anchor point used to position the Scandit logo.

Default is Anchor.BOTTOM_RIGHT.

start()
fun start()

Added in version 8.7.0

This method starts the camera but does not begin the sequencing process. The sequencing process will start when the user taps the shutter button.

startSequencing()
fun startSequencing()

Added in version 8.7.0

This method starts the sequencing process. It can be paused using pauseSequencing().

pause()
fun pause()

Added in version 8.7.0

Pauses the sequencing process. start() brings the view back to its initialized state on both platforms; sequencing itself then starts on the next shutter tap or with startSequencing(). On Android this also releases the camera, on iOS the camera keeps running — the native iOS view exposes no camera-only pause, so there is no resumable call that releases the iOS camera.

pauseSequencing()
fun pauseSequencing()

Added in version 8.7.0

Pauses the sequencing process but keeps the camera running. It can be started again using startSequencing().

stop()
fun stop()

Added in version 8.7.0

Stops the camera and the sequencing process.

On iOS it can be started again using start(). On Android it also destroys the native view, so it is terminal there; call it when the view leaves the screen for good.

reset()
fun reset()

Added in version 8.7.0

Clears UI state and resets the view.