Barcode Ar View
Defined in package com.scandit.datacapture.barcode.ar.ui
- BarcodeArViewUiListener
interface BarcodeArViewUiListener
Added in version 7.1.0
- onHighlightForBarcodeTapped(barcodeAr, barcode, highlight, highlightView)
void
onHighlightForBarcodeTapped(@NonNull BarcodeAr barcodeAr, @NonNull Barcode barcode, @NonNull BarcodeArHighlight highlight, @NonNull View highlightView)Added in version 7.1.0
Callback method that is called when a barcode highlight is tapped in the view.
- BarcodeArView
class BarcodeArView : FrameLayout
Added in version 7.1.0
BarcodeAr 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.
- BarcodeArView()
BarcodeArView(@NonNull ViewGroup parentView, @NonNull BarcodeAr barcodeAr, @NonNull DataCaptureContext dataCaptureContext, @Nullable BarcodeArViewSettings settings, @Nullable CameraSettings cameraSettings)
Added in version 7.1.0
Creates a new BarcodeArView with the provided mode, viewSettings and cameraSettings.
- BarcodeArView()
BarcodeArView(@NonNull ViewGroup parentView, @NonNull BarcodeAr barcodeAr, @NonNull DataCaptureContext dataCaptureContext, @Nullable BarcodeArViewSettings settings)
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 BarcodeArView() with null cameraSettings.
- uiListener
@Nullable BarcodeArViewUiListener getUiListener()
void
setUiListener(@Nullable BarcodeArViewUiListener value)Added in version 7.1.0
Sets the listener which is called whenever a barcode highlight is tapped in the view.
- highlightProvider
@Nullable BarcodeArHighlightProvider getHighlightProvider()
void
setHighlightProvider(@Nullable BarcodeArHighlightProvider value)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
@Nullable BarcodeArAnnotationProvider getAnnotationProvider()
void
setAnnotationProvider(@Nullable BarcodeArAnnotationProvider value)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
boolean
getShouldShowTorchControl()void
setShouldShowTorchControl(boolean
value)Added in version 7.1.0
Indicates whether the torch control button should be shown to the user.
Default is false.
- torchControlPosition
Anchor getTorchControlPosition()
void
setTorchControlPosition(Anchor value)Added in version 7.1.0
Updates the position of the torch control button.
Default is Anchor.TOP_LEFT.
- shouldShowZoomControl
boolean
getShouldShowZoomControl()void
setShouldShowZoomControl(boolean
value)Added in version 7.1.0
Indicates whether the zoom control button should be shown to the user.
- zoomControlPosition
Anchor getZoomControlPosition()
void
setZoomControlPosition(Anchor value)Added in version 7.1.0
Updates the position of the zoom control button.
Default is Anchor.BOTTOM_RIGHT.
- shouldShowCameraSwitchControl
boolean
getShouldShowCameraSwitchControl()void
setShouldShowCameraSwitchControl(boolean
value)Added in version 7.1.0
Indicates whether the camera switch control button should be shown to the user.
- cameraSwitchControlPosition
Anchor getCameraSwitchControlPosition()
void
setCameraSwitchControlPosition(Anchor value)Added in version 7.1.0
Updates the position of the camera switch control button.
Default is Anchor.TOP_RIGHT.
- start()
void
start()Added in version 7.1.0
Starts the scanning process.
The scanning process will actually start only if the lifecycle state is resumed, which can be done by calling onResume().
- stop()
void
stop()Added in version 7.1.0
Stops the scanning process.
- onPause()
void
onPause()Added in version 7.1.0
Function to call on Fragment/Activity onPause callback. This will set the BarcodeArView’s lifecycle state to Paused. Scanning only happens when the BarcodeArView is in Resumed state. You have to call this for the correct functioning of the BarcodeArView.
override fun onPause() { super.onPause() barcodeArView.onPause() }
- onResume()
void
onResume()Added in version 7.1.0
Function to call on Fragment/Activity onResume callback. This will set the BarcodeArView’s lifecycle state to Resumed. Scanning only happens when the BarcodeArView is in Resumed state. You have to call this for the correct functioning of the BarcodeArView.
override fun onResume() { super.onResume() barcodeArView.onResume() }
- onDestroy()
void
onDestroy()Added in version 7.1.0
Function to call on Fragment/Activity onDestroyView callback. This will set the BarcodeArView’s lifecycle state to Destroyed. Scanning only happens when the BarcodeArView is in Resumed state. You have to call this for the correct functioning of the BarcodeArView.
override fun onDestroyView() { super.onDestroyView() barcodeArView.onDestroy() }
- reset()
void
reset()Added in version 7.1.0
Clears all highlights and annotations currently visible and calls highlightProvider and annotationProvider to supply new highlights and annotations.