Barcode Sequence View
Defined in package com.scandit.datacapture.barcode.sequence.ui
- BarcodeSequenceState
Added in version 8.1.3
The possible states of the BarcodeSequenceView.
- INITIALIZED
Added in version 8.1.3
The view has been initialized and is ready to start sequencing.
- INITIALIZED_WITH_WRONG_ORIENTATION
Added in version 8.1.3
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.1.3
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.1.3
The view is actively sequencing.
- PAUSED
Added in version 8.1.3
The sequencing process has been paused.
- PAUSED_DUE_TO_INACTIVITY
Added in version 8.1.3
The sequencing process has been paused automatically due to user inactivity.
- PAUSED_DUE_TO_ORIENTATION_CHANGE
Added in version 8.1.3
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.1.3
The sequencing process has been paused due to the device not being held facing the shelf.
- STOPPED
Added in version 8.1.3
The sequencing process has been stopped.
- ERROR
Added in version 8.4.0
The sequencing process encountered an error. The error will be displayed on the view.
- BarcodeSequenceViewUIListener
interface BarcodeSequenceViewUIListenerAdded in version 8.0.0
- onNextButtonTapped(barcodeSequenceView, sequencedShelfModule)
fun onNextButtonTapped(barcodeSequenceView: BarcodeSequenceView, sequencedShelfModule: SequencedShelfModule?)
Added in version 8.0.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(barcodeSequenceView, sequencedShelfModule)
fun onViewListButtonTapped(barcodeSequenceView: BarcodeSequenceView, sequencedShelfModule: SequencedShelfModule?)
Added in version 8.0.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(barcodeSequenceView, state)
fun onStateChanged(barcodeSequenceView: BarcodeSequenceView, state: BarcodeSequenceState)
Added in version 8.1.3
Callback method that is called when the BarcodeSequenceView state changes.
- BarcodeSequenceView
class BarcodeSequenceView : FrameLayout
Added in version 8.0.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.
Note
Orientation Handling
Barcode Sequence supports both portrait and landscape orientations. To preserve tracking state across device rotation, use
android:configChanges="screenSize|orientation"on the host Activity so it is not recreated on rotation.- BarcodeSequenceView()
BarcodeSequenceView(parentView: ViewGroup, barcodeSequence: BarcodeSequence, dataCaptureContext: DataCaptureContext, settings: BarcodeSequenceViewSettings, cameraSettings: CameraSettings?)
Added in version 8.0.0
Creates a new BarcodeSequenceView with the provided mode, view settings, camera settings.
- BarcodeSequenceView()
BarcodeSequenceView(parentView: ViewGroup, barcodeSequence: BarcodeSequence, dataCaptureContext: DataCaptureContext, settings: BarcodeSequenceViewSettings)
Added in version 8.0.0
Creates a new BarcodeSequenceView with the provided mode, view settings, and default camera settings from BarcodeSequence.createRecommendedCameraSettings().
- uiListener
var uiListener: BarcodeSequenceViewUIListener?
Added in version 8.0.0
Sets the listener which is called whenever buttons are tapped in the view.
- state
val state: BarcodeSequenceState
Added in version 8.1.3
The current state of the BarcodeSequenceView.
- sequencedShelfModule
val sequencedShelfModule: SequencedShelfModule?
Added in version 8.1.3
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:
BooleanAdded in version 8.0.0
Indicates whether the torch control button should be shown.
Default is true.
- torchControlPosition
var torchControlPosition: Anchor
Added in version 8.0.0
Updates the position of the torch control button.
Default is Anchor.TOP_LEFT.
- initialGuidanceTitleText
var initialGuidanceTitleText: String
Added in version 8.0.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.0.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.0.0
The button text for the initial guidance tutorial dialog.
Default is “OK”.
- rotateDeviceToCaptureText
var rotateDeviceToCaptureText: String
Added in version 8.0.0
The text displayed in the rotation prompt when the device needs to be rotated for sequencing.
Defaults to “Rotate to landscape to capture” when BarcodeSequenceSettings’ shelf sequencing orientation is ShelfSequencingOrientation.LANDSCAPE_ONLY (or ShelfSequencingOrientation.ANY), and to “Rotate to portrait to capture” when it is ShelfSequencingOrientation.PORTRAIT_ONLY.
- pointShelfToCaptureText
var pointShelfToCaptureText: String
Added in version 8.1.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:
BooleanAdded in version 8.0.0
Whether the View List button is shown.
Default is true.
- shouldShowNextButton
var shouldShowNextButton:
BooleanAdded in version 8.0.0
Whether the Next button is shown.
Default is true.
- shouldShowRedoButton
var shouldShowRedoButton:
BooleanAdded in version 8.0.0
Whether the Redo button is shown.
Default is true.
- shouldShowShutterButton
var shouldShowShutterButton:
BooleanAdded in version 8.1.3
Whether the shutter button is shown.
Default is true.
- shouldShowTrayIndicatorText
var shouldShowTrayIndicatorText:
BooleanAdded in version 8.1.5
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.0.0
The text for the Next button.
Default is “Next”.
- redoButtonText
var redoButtonText: String
Added in version 8.0.0
The text for the Redo button.
Default is “Redo”.
- viewListButtonText
var viewListButtonText: String
Added in version 8.0.0
The text for the View List button.
Default is “View List”.
- redoShelfDialogTitleText
var redoShelfDialogTitleText: String
Added in version 8.0.0
The title text for the redo confirmation dialog.
Default is “Redo Shelf”.
- redoShelfDialogDescriptionText
var redoShelfDialogDescriptionText: String
Added in version 8.0.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.0.0
The accept button text for the redo confirmation dialog.
Default is “Redo”.
- redoShelfDialogCancelButtonText
var redoShelfDialogCancelButtonText: String
Added in version 8.0.0
The cancel button text for the redo confirmation dialog.
Default is “Cancel”.
- removeBarcodeButtonText
var removeBarcodeButtonText: String
Added in version 8.0.0
The text for the remove barcode button in popover annotation.
Default is “Remove”.
- addBarcodeButtonText
var addBarcodeButtonText: String
Added in version 8.0.0
The text for the add barcode button in popover annotation.
Default is “Add”.
- logoStyle
var logoStyle: LogoStyle
Added in version 8.5.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.5.0
The anchor point used to position the Scandit logo.
Default is Anchor.BOTTOM_RIGHT.
- onResume()
fun onResume()Added in version 8.0.0
Function to call on Fragment/Activity onResume callback. This will set the BarcodeSequenceView’s lifecycle state to Resumed. Scanning only happens when the BarcodeSequenceView is in Resumed state. You have to call this for the correct functioning of the BarcodeSequenceView.
override fun onResume() { super.onResume() barcodeSequenceView.onResume() }
- onPause()
fun onPause()Added in version 8.0.0
Function to call on Fragment/Activity onPause callback. This will set the BarcodeSequenceView’s lifecycle state to Paused. Scanning only happens when the BarcodeSequenceView is in Resumed state. You have to call this for the correct functioning of the BarcodeSequenceView.
override fun onPause() { super.onPause() barcodeSequenceView.onPause() }
- onDestroy()
fun onDestroy()Added in version 8.0.0
Function to call on Fragment/Activity onDestroyView callback. This will set the BarcodeSequenceView’s lifecycle state to Destroyed. Scanning only happens when the BarcodeSequenceView is in Resumed state. You have to call this for the correct functioning of the BarcodeSequenceView.
override fun onDestroyView() { super.onDestroyView() barcodeSequenceView.onDestroy() }
- startSequencing()
fun startSequencing()Added in version 8.1.3
This method starts the sequencing process. It can be paused using pauseSequencing().
- pauseSequencing()
fun pauseSequencing()Added in version 8.1.3
Pauses the sequencing process but keeps the camera running. It can be started again using startSequencing().
- reset()
fun reset()Added in version 8.0.0
Clears UI state and resets the view.