Barcode Selection Basic Overlay

Defined in package com.scandit.datacapture.barcode.selection.ui.overlay

BarcodeSelectionBasicOverlayStyle

Added in version 6.10.0

The style of the BarcodeSelectionBasicOverlay.

FRAME

Added in version 6.10.0

Style that draws the highlights as a rectangular frame and adds an animation for when a code newly appears.

DOT

Added in version 6.10.0

Style that draws the highlights as a dot and adds an animation for when a code newly appears.

BarcodeSelectionBrushProvider
interface BarcodeSelectionBrushProvider

Added in version 6.17.0

Interface for applying custom brushes to recognized barcodes.

brushForBarcode(barcode)
fun brushForBarcode(barcode: Barcode): Brush?

Added in version 6.17.0

Return the brush to apply to the given barcode. A non-null brush returned by this method overrides any other brush set for the barcode.

BarcodeSelectionBasicOverlay
class BarcodeSelectionBasicOverlay : DataCaptureOverlay

Added in version 6.9.0

An overlay for DataCaptureView that shows a simple augmentation over each selected barcode.

To display the augmentations, this overlay must be attached to a DataCaptureView. This may be done either by creating it with newInstance() with a non-null view parameter or by passing this overlay to DataCaptureView.addOverlay().

A user of this class may configure the appearance of the augmentations by configuring the brush properties.

newInstance(barcodeSelection, view)
fun BarcodeSelectionBasicOverlay.newInstance(barcodeSelection: BarcodeSelection,
        view: DataCaptureView?): BarcodeSelectionBasicOverlay

Added in version 6.9.0

Constructs a new barcode selection basic overlay for the barcode selection instance. The overlay is automatically added to the view.

newInstance(barcodeSelection, view, style)
fun BarcodeSelectionBasicOverlay.newInstance(barcodeSelection: BarcodeSelection,
        view: DataCaptureView?,
        style: BarcodeSelectionBasicOverlayStyle): BarcodeSelectionBasicOverlay

Added in version 6.10.0

Constructs a new barcode selection basic overlay for the barcode selection instance with the specified style. The overlay is automatically added to the view.

fromJson(mode, jsonData)
fun BarcodeSelectionBasicOverlay.fromJson(mode: BarcodeSelection,
        jsonData: String): BarcodeSelectionBasicOverlay

Added in version 6.10.0

Constructs a new barcode selection basic overlay with the provided JSON serialization.

For the overlay to be displayed on screen, it must be added to a DataCaptureView.

defaultTrackedBrush(style)
fun BarcodeSelectionBasicOverlay.defaultTrackedBrush(style: BarcodeSelectionBasicOverlayStyle): Brush

Added in version 6.10.1

Returns the default tracked brush for the given style.

defaultAimedBrush(style)
fun BarcodeSelectionBasicOverlay.defaultAimedBrush(style: BarcodeSelectionBasicOverlayStyle): Brush

Added in version 6.10.1

Returns the default aimed brush for the given style.

defaultSelectedBrush(style)
fun BarcodeSelectionBasicOverlay.defaultSelectedBrush(style: BarcodeSelectionBasicOverlayStyle): Brush

Added in version 6.10.1

Returns the default selected brush for the given style.

defaultSelectingBrush(style)
fun BarcodeSelectionBasicOverlay.defaultSelectingBrush(style: BarcodeSelectionBasicOverlayStyle): Brush

Added in version 6.10.1

Returns the default selecting brush for the given style.

trackedBrush
var trackedBrush: Brush

Added in version 6.9.0

The brush applied to recognized tracked barcodes. Setting this brush to Brush.transparent() hides all tracked barcodes.

aimedBrush
var aimedBrush: Brush

Added in version 6.9.0

The brush applied to the barcode that is currently being aimed at.

selectedBrush
var selectedBrush: Brush

Added in version 6.9.0

The brush applied to selected barcodes. Setting this brush to Brush.transparent() hides all selected barcodes.

selectingBrush
var selectingBrush: Brush

Added in version 6.9.0

The brush applied to the barcodes for the short moment when they are being selected.

shouldShowScanAreaGuides
var shouldShowScanAreaGuides: Boolean

Added in version 6.9.0

When set to true, this overlay will visualize the active scan area used for BarcodeSelection. This is useful to check margins defined on the DataCaptureView are set correctly. This property is meant for debugging during development and is not intended for use in production.

By default this property is false.

shouldShowHints
var shouldShowHints: Boolean

Added in version 6.9.0

When set to true, this overlay will visualize some hints explaining how to use barcode selection.

By default this property is true.

viewfinder
val viewfinder: Viewfinder

Added in version 6.9.0

The viewfinder of the overlay. The viewfinder is only visible when the selection type is BarcodeSelectionAimerSelection.

clearSelectedBarcodeBrushes()
fun clearSelectedBarcodeBrushes()

Added in version 6.9.0

Clears all currently displayed visualizations for the on screen barcodes.

This only applies to the currently displayed barcodes, the visualizations for the new ones will still appear.

setTextForSelectOrDoubleTapToFreezeHint(text)
fun setTextForSelectOrDoubleTapToFreezeHint(
        text: String)

Added in version 6.14.0

Sets the text of the hint which suggests to use double tap gesture to freeze capture view.

setTextForTapToSelectHint(text)
fun setTextForTapToSelectHint(text: String)

Added in version 6.14.0

Sets the text of the hint which suggests to use tap gesture to select barcodes.

setTextForDoubleTapToUnfreezeHint(text)
fun setTextForDoubleTapToUnfreezeHint(text: String)

Added in version 6.14.0

Sets the text of the hint which suggests to use double tap gesture to unfreeze capture view.

setTextForTapAnywhereToSelectHint(text)
fun setTextForTapAnywhereToSelectHint(text: String)

Added in version 6.14.0

Sets the text of the hint which suggests to use tap gesture anywhere on the screen to select.

setTextForAimToSelectAutoHint(text)
fun setTextForAimToSelectAutoHint(text: String)

Added in version 6.18.0

Sets the text of the hint which suggests to aim at a barcode to scan it.

aimedBarcodeBrushProvider
var aimedBarcodeBrushProvider: BarcodeSelectionBrushProvider?

Added in version 6.17.0

The brush provider for aimed barcode.

trackedBarcodeBrushProvider
var trackedBarcodeBrushProvider: BarcodeSelectionBrushProvider?

Added in version 6.17.0

The brush provider for tracked barcode.

updateFromJson(jsonData)
fun updateFromJson(jsonData: String)

Added in version 6.10.0

Updates the overlay according to a JSON serialization.

frozenBackgroundColor
var frozenBackgroundColor: Int

Added in version 6.12.0

The overlay’s background color when in frozen state. This color will be on top of the video preview but below the highlights. Semitransparent black by default.

style
val style: BarcodeSelectionBasicOverlayStyle

Added in version 6.10.0

The overlay style. Defaults to Frame.