Interface IBarcodeScannerView
-
- All Implemented Interfaces:
public interface IBarcodeScannerView
A component which allows to quickly integrate a Barcode scanning feature into your application. It wraps BarcodeDetectorFrameHandler, io.scanbot.sdk.ui.camera.IScanbotCameraView, io.scanbot.sdk.camera.IFinderView and BarcodeAutoSnappingController providing an interface allowing to control appearance and behavior of the component.
To start using it you need to add BarcodeScannerView into your layout and the call two methods initCamera and initDetectionBehavior (see corresponding docs).
If you use a legacy camera (non CameraX - see CameraUiSettings) it is also required to call IBarcodeScannerViewController.onResume on the viewController in Activity onResume and IBarcodeScannerViewController.onPause on the viewController in Activity onPause
-
-
Method Summary
Modifier and Type Method Description abstract Unit
initCamera(CameraUiSettings cameraUiSettings)
This must be called in the onCreate of the Activity abstract Unit
initDetectionBehavior(ScanbotBarcodeDetector barcodeDetector, BarcodeDetectorFrameHandler.ResultHandler resultHandler, IBarcodeScannerViewCallback callback)
This should be called as soon as you have an instance of the Contour detector. abstract Boolean
usesCameraX()
Get the flag, indicating that the underlying camera view is CameraX-based. abstract IBarcodeScannerViewController
getViewController()
Use this object to control the state or the behavior of the IBarcodeScannerView abstract IBarcodeScannerViewCameraConfiguration
getCameraConfiguration()
Use this object to control configuration parameters of the Camera inside abstract IBarcodeScannerFinderViewController
getFinderViewController()
Use this object to control the state or the behavior of the Finder inside abstract IBarcodeScannerSelectionOverlayController
getSelectionOverlayController()
Use this object to control the state or the behavior of the selection overlay layer -
-
Method Detail
-
initCamera
abstract Unit initCamera(CameraUiSettings cameraUiSettings)
This must be called in the onCreate of the Activity
-
initDetectionBehavior
abstract Unit initDetectionBehavior(ScanbotBarcodeDetector barcodeDetector, BarcodeDetectorFrameHandler.ResultHandler resultHandler, IBarcodeScannerViewCallback callback)
This should be called as soon as you have an instance of the Contour detector. It is recommended to call it in onCreate of the Activity
-
usesCameraX
abstract Boolean usesCameraX()
Get the flag, indicating that the underlying camera view is CameraX-based.
-
getViewController
abstract IBarcodeScannerViewController getViewController()
Use this object to control the state or the behavior of the IBarcodeScannerView
-
getCameraConfiguration
abstract IBarcodeScannerViewCameraConfiguration getCameraConfiguration()
Use this object to control configuration parameters of the Camera inside
-
getFinderViewController
abstract IBarcodeScannerFinderViewController getFinderViewController()
Use this object to control the state or the behavior of the Finder inside
-
getSelectionOverlayController
abstract IBarcodeScannerSelectionOverlayController getSelectionOverlayController()
Use this object to control the state or the behavior of the selection overlay layer
-
-
-
-