Barcode AR View
Defined under the namespace Scandit.Datacapture.Barcode.Ar.Ui
- BarcodeArViewUiListener
interface BarcodeArViewUiListenerAdded in version 7.1.0
- didTapHighlightForBarcode(barcodeAr, barcode, highlight)
didTapHighlightForBarcode(barcodeAr: BarcodeAr, barcode: Barcode, highlight: BarcodeArHighlight):
voidAdded in version 7.1.0
Callback method that is called when a barcode highlight is tapped in the view.
- BarcodeArView
class BarcodeArViewAdded in version 7.1.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.
- forMode(dataCaptureContext, barcodeAr)
static forMode(dataCaptureContext: DataCaptureContext, barcodeAr: BarcodeAr): BarcodeArView
Added in version 7.1.0
Creates a new BarcodeArView with the provided mode, viewSettings and cameraSettings.
- forModeWithViewSettingsAndCameraSettings(dataCaptureContext, barcodeAr, viewSettings, cameraSettings)
static forModeWithViewSettingsAndCameraSettings( dataCaptureContext: DataCaptureContext, barcodeAr: BarcodeAr, viewSettings: BarcodeArViewSettings, cameraSettings: CameraSettings): BarcodeArView
Added in version 7.1.0
Creates a new BarcodeArView with the provided mode, viewSettings and cameraSettings.
- forModeWithViewSettings(dataCaptureContext, barcodeAr, viewSettings)
static forModeWithViewSettings(dataCaptureContext: DataCaptureContext, barcodeAr: BarcodeAr, viewSettings: BarcodeArViewSettings): BarcodeArView
Added in version 7.1.0
Creates a new BarcodeArView with the provided mode, viewSettings and default camera settings from BarcodeAr.createRecommendedCameraSettings(). This is equivalent of calling forMode() with null cameraSettings.
- uiListener
uiListener: BarcodeArViewUiListener | null
Added in version 7.1.0
Sets the listener which is called whenever a barcode highlight is tapped in the view.
- highlightProvider
highlightProvider: BarcodeArHighlightProvider | null
Added in version 7.1.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
annotationProvider: BarcodeArAnnotationProvider | null
Added in version 7.1.0
Sets the provider which supplies annotation information for barcodes in the view. If null, no annotation will be displayed for any barcode.
- shouldShowTorchControl
shouldShowTorchControl: boolean
Added in version 7.1.0
Indicates whether the torch control button should be shown to the user.
Default is false.
- torchControlPosition
torchControlPosition: Anchor
Added in version 7.1.0
Updates the position of the torch control button.
Default is Anchor.TopLeft.
- torchControlOffset
torchControlOffset: PointWithUnit | null
Added in version 8.6.0
Sets the visual offset of the torch control button.
- shouldShowZoomControl
shouldShowZoomControl: boolean
Added in version 7.1.0
Indicates whether the zoom control button should be shown to the user.
- zoomControlPosition
zoomControlPosition: Anchor
Added in version 7.1.0
Updates the position of the zoom control button.
Default is Anchor.BottomRight.
- zoomControlOffset
zoomControlOffset: PointWithUnit | null
Added in version 8.6.0
Sets the visual offset of the zoom control button.
- zoomControlOrientation
zoomControlOrientation: ZoomSwitchOrientation
Added in version 8.6.0
Sets the orientation of the zoom control button.
Default is ZoomSwitchOrientation.Default.
- shouldShowCameraSwitchControl
shouldShowCameraSwitchControl: boolean
Added in version 7.1.0
Indicates whether the camera switch control button should be shown to the user.
- cameraSwitchControlPosition
cameraSwitchControlPosition: Anchor
Added in version 7.1.0
Updates the position of the camera switch control button.
Default is Anchor.TopRight.
- cameraSwitchControlOffset
cameraSwitchControlOffset: PointWithUnit | null
Added in version 8.6.0
Sets the visual offset of the camera switch control button.
- logoStyle
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
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.BottomRight.
- logoOffset
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.
- shouldShowMacroModeControl
shouldShowMacroModeControl: boolean
Added in version 7.1.0
Indicates whether the macro mode control button should be shown to the user.
- macroModeControlPosition
macroModeControlPosition: Anchor
Added in version 7.1.0
Updates the position of the macro mode control button.
Default is Anchor.TopRight.
- macroModeControlOffset
macroModeControlOffset: PointWithUnit | null
Added in version 8.6.0
Sets the visual offset of the macro mode control button.
- stop()
stop(): Promise<
void>Added in version 7.1.0
Stops the scanning process.
On Android the highlights and annotations that are already shown are kept, and they are still there when scanning starts again. On iOS they are removed, and they are supplied again by the providers after the next start. Resetting or disposing the view removes them.
- pause()
pause(): Promise<
void>Added in version 7.1.0
Pauses the scanning process.
The highlights and annotations that are already shown are kept, so they stay tappable while the view is paused and when scanning starts again. Resetting or disposing the view removes them.
- reset()
reset(): Promise<
void>Added in version 7.2.0
Clears all highlights and annotations currently visible and calls highlightProvider and annotationProvider to supply new highlights and annotations.