Barcode AR View

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

BarcodeArViewUiListener
interface BarcodeArViewUiListener

Added in version 8.6.0

onHighlightForBarcodeTapped(barcodeAr, barcode, highlight)
fun onHighlightForBarcodeTapped(barcodeAr: BarcodeAr,
        barcode: Barcode,
        highlight: BarcodeArHighlight)

Added in version 8.6.0

Callback method that is called when a barcode highlight is tapped in the view.

BarcodeArView
class BarcodeArView

Added in version 8.6.0

Barcode AR comes with a ready-to-use UI that allows highlighting barcodes and displaying additional information over them. The BarcodeArView integrates with any app in just a few lines of code.

uiListener
var uiListener: BarcodeArViewUiListener?

Added in version 8.6.0

Sets the listener which is called whenever a barcode highlight is tapped in the view.

highlightProvider
var highlightProvider: BarcodeArHighlightProvider?

Added in version 8.6.0

Sets the provider which supplies highlight information for barcodes in the view. If null, a default provider is used, which returns a predefined highlight for each barcode.

annotationProvider
var annotationProvider: BarcodeArAnnotationProvider?

Added in version 8.6.0

Sets the provider which supplies annotation information for barcodes in the view. If null, no annotation will be displayed for any barcode.

shouldShowTorchControl
var shouldShowTorchControl: Boolean

Added in version 8.6.0

Indicates whether the torch control button should be shown to the user.

Default is false.

torchControlPosition
var torchControlPosition: Anchor

Added in version 8.6.0

Updates the position of the torch control button.

Default is Anchor.TOP_LEFT.

torchControlOffset
var torchControlOffset: PointWithUnit

Added in version 8.6.0

Sets the visual offset of the torch control button.

shouldShowZoomControl
var shouldShowZoomControl: Boolean

Added in version 8.6.0

Indicates whether the zoom control button should be shown to the user.

zoomControlPosition
var zoomControlPosition: Anchor

Added in version 8.6.0

Updates the position of the zoom control button.

Default is Anchor.BOTTOM_RIGHT.

zoomControlOffset
var zoomControlOffset: PointWithUnit

Added in version 8.6.0

Sets the visual offset of the zoom control button.

zoomControlOrientation
var zoomControlOrientation: ZoomSwitchOrientation

Added in version 8.6.0

Sets the orientation of the zoom control button.

Default is ZoomSwitchOrientation.DEFAULT.

shouldShowCameraSwitchControl
var shouldShowCameraSwitchControl: Boolean

Added in version 8.6.0

Indicates whether the camera switch control button should be shown to the user.

cameraSwitchControlPosition
var cameraSwitchControlPosition: Anchor

Added in version 8.6.0

Updates the position of the camera switch control button.

Default is Anchor.TOP_RIGHT.

cameraSwitchControlOffset
var cameraSwitchControlOffset: PointWithUnit

Added in version 8.6.0

Sets the visual offset of the camera switch control button.

logoStyle
var logoStyle: LogoStyle

Added in version 8.6.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.6.0

The anchor point used to position the Scandit logo. To shift the logo relative to the anchor, use logoOffset.

Default is Anchor.BOTTOM_RIGHT.

logoOffset
var logoOffset: PointWithUnit

Added in version 8.6.0

The offset applied to the Scandit logo relative to the logo anchor. When specified in pixels (MeasureUnit.PIXEL) the offset is used as-is. When specified as a fraction (MeasureUnit.FRACTION) the offset is computed relative to the view size minus the scan area margins.

Default is a zero offset.

start()
fun start()

Added in version 8.6.0

Starts the scanning process.

stop()
fun stop()

Added in version 8.6.0

Stops the scanning process.

pause()
fun pause()

Added in version 8.6.0

Pauses the scanning process.

reset()
fun reset()

Added in version 8.6.0

Removes all current highlights and annotations.

BarcodeArViewState
class BarcodeArViewState

Added in version 8.6.0

Compose Multiplatform state holder that drives the lifecycle of a BarcodeArView composable. Obtain one with rememberBarcodeArViewState() and call its methods to control scanning from your composition. It exposes the same start/pause/stop/reset lifecycle as the imperative BarcodeArView; see the KMP lifecycle note on that class for the native mapping.

BarcodeArViewState()
BarcodeArViewState()

Added in version 8.6.0

Creates a new state holder.

start()
fun start()

Added in version 8.6.0

Starts the scanning process.

pause()
fun pause()

Added in version 8.6.0

Pauses the scanning process. Resume it with start().

stop()
fun stop()

Added in version 8.6.0

Tears the view down and releases its resources. The view is no longer usable afterwards.

reset()
fun reset()

Added in version 8.6.0

Removes all current highlights and annotations.