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)
@Nullable Brush brushForBarcode(@NonNull Barcode barcode)

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)
static @NonNull BarcodeSelectionBasicOverlay newInstance(
        @NonNull BarcodeSelection barcodeSelection,
        @Nullable DataCaptureView view)

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)
static @NonNull BarcodeSelectionBasicOverlay newInstance(
        @NonNull BarcodeSelection barcodeSelection,
        @Nullable DataCaptureView view,
        BarcodeSelectionBasicOverlayStyle style)

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)
static @NonNull BarcodeSelectionBasicOverlay fromJson(
        @NonNull BarcodeSelection mode,
        @NonNull String jsonData)

Added in version 6.10.0

Constructs a new barcode selection basic overlay with the provided JSON serialization. See Serialization for details.

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

DEFAULT_TRACKED_BRUSH
static final @NonNull Brush DEFAULT_TRACKED_BRUSH

Added in version 6.9.0

The default brush applied to recognized tracked barcodes.

Deprecated since version 6.10.1: The defaultTrackedBrush of the overlay depends on the style used, there is no unique default brush. Use defaultTrackedBrush() instead.

defaultTrackedBrush(style)
static Brush defaultTrackedBrush(BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.1

Returns the default tracked brush for the given style.

DEFAULT_AIMED_BRUSH
static final @NonNull Brush DEFAULT_AIMED_BRUSH

Added in version 6.9.0

The default brush applied to aimed barcodes.

Deprecated since version 6.10.1: The defaultAimedBrush of the overlay depends on the style used, there is no unique default brush. Use defaultAimedBrush() instead.

defaultAimedBrush(style)
static Brush defaultAimedBrush(BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.1

Returns the default aimed brush for the given style.

DEFAULT_SELECTED_BRUSH
static final @NonNull Brush DEFAULT_SELECTED_BRUSH

Added in version 6.9.0

The default brush applied to selected barcodes.

Deprecated since version 6.10.1: The defaultSelectedBrush of the overlay depends on the style used, there is no unique default brush. Use defaultSelectedBrush() instead.

defaultSelectedBrush(style)
static Brush defaultSelectedBrush(BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.1

Returns the default selected brush for the given style.

DEFAULT_SELECTING_BRUSH
static final @NonNull Brush DEFAULT_SELECTING_BRUSH

Added in version 6.9.0

The default brush applied to barcodes currently being selected.

Deprecated since version 6.10.1: The defaultSelectingBrush of the overlay depends on the style used, there is no unique default brush. Use defaultSelectingBrush() instead.

defaultSelectingBrush(style)
static Brush defaultSelectingBrush(BarcodeSelectionBasicOverlayStyle style)

Added in version 6.10.1

Returns the default selecting brush for the given style.

trackedBrush
@NonNull Brush getTrackedBrush()
void setTrackedBrush(@NonNull Brush value)

Added in version 6.9.0

The brush applied to recognized tracked barcodes, by default the value is set to DEFAULT_TRACKED_BRUSH. Setting this brush to Brush.transparent() hides all tracked barcodes.

aimedBrush
@NonNull Brush getAimedBrush()
void setAimedBrush(@NonNull Brush value)

Added in version 6.9.0

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

By default the value is set to DEFAULT_AIMED_BRUSH.

selectedBrush
@NonNull Brush getSelectedBrush()
void setSelectedBrush(@NonNull Brush value)

Added in version 6.9.0

The brush applied to selected barcodes, by default the value is set to DEFAULT_SELECTED_BRUSH. Setting this brush to Brush.transparent() hides all selected barcodes.

selectingBrush
@NonNull Brush getSelectingBrush()
void setSelectingBrush(@NonNull Brush value)

Added in version 6.9.0

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

By default the value is set to DEFAULT_SELECTING_BRUSH.

shouldShowScanAreaGuides
boolean getShouldShowScanAreaGuides()
void setShouldShowScanAreaGuides(boolean value)

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
boolean getShouldShowHints()
void setShouldShowHints(boolean value)

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
@NonNull Viewfinder getViewfinder()

Added in version 6.9.0

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

clearSelectedBarcodeBrushes()
void 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)
void setTextForSelectOrDoubleTapToFreezeHint(
        @NonNull String text)

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)
void setTextForTapToSelectHint(@NonNull String text)

Added in version 6.14.0

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

setTextForDoubleTapToUnfreezeHint(text)
void setTextForDoubleTapToUnfreezeHint(@NonNull String text)

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)
void setTextForTapAnywhereToSelectHint(@NonNull String text)

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)
void setTextForAimToSelectAutoHint(@NonNull String text)

Added in version 6.18.0

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

aimedBarcodeBrushProvider
@Nullable BarcodeSelectionBrushProvider getAimedBarcodeBrushProvider()
void setAimedBarcodeBrushProvider(@Nullable BarcodeSelectionBrushProvider value)

Added in version 6.17.0

The brush provider for aimed barcode.

trackedBarcodeBrushProvider
@Nullable BarcodeSelectionBrushProvider getTrackedBarcodeBrushProvider()
void setTrackedBarcodeBrushProvider(@Nullable BarcodeSelectionBrushProvider value)

Added in version 6.17.0

The brush provider for tracked barcode.

updateFromJson(jsonData)
void updateFromJson(@NonNull String jsonData)

Added in version 6.10.0

Updates the overlay according to a JSON serialization. See Serialization for details.

frozenBackgroundColor
int getFrozenBackgroundColor()
void setFrozenBackgroundColor(int value)

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
BarcodeSelectionBasicOverlayStyle getStyle()

Added in version 6.10.0

The overlay style. Defaults to Frame.