BarcodeScanAndCountView

A component which allows to quickly integrate a Barcode counting feature into your application. It wraps BarcodeCounterFrameHandler, io.scanbot.sdk.ui.camera.IScanbotCameraView, providing an interface allowing to control appearance and behavior of the component.

To start using it you need to add BarcodeScanAndCountView into your layout and the call two methods initCamera and initScanningBehavior (see corresponding docs).

If you use a legacy camera (non CameraX - see CameraUiSettings) it is also required to call IBarcodeScanCountViewController.onResume on the viewController in Activity onResume and IBarcodeScanCountViewController.onPause on the viewController in Activity onPause

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null)

Properties

Link copied to clipboard

Use this object to control configuration parameters of the Camera inside

Link copied to clipboard
Link copied to clipboard

Use this object to control the state or the behavior of the selection overlay layer

Link copied to clipboard

Use this object to control the state or the behavior of the IBarcodeCounterView

Functions

Link copied to clipboard
open override fun initCamera()

This must be called in the onCreate of the Activity

Link copied to clipboard
open override fun initScanningBehavior(barcodeScanner: BarcodeScanner, callback: IBarcodeScanCountViewCallback?)

This should be called as soon as you have an instance of the Document scanner. It is recommended to call it in onCreate of the Activity