DocumentScannerView

A component which allows to quickly integrate a Document scanning feature into your application. It wraps DocumentScannerFrameHandler, io.scanbot.sdk.ui.camera.IScanbotCameraView, io.scanbot.sdk.camera.IFinderView and DocumentAutoSnappingController providing an interface allowing to contol appearance and behavior of the component.

To start using it you need to add DocumentScannerView 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 IDocumentScannerViewController.onResume on the viewController in Activity onResume and IDocumentScannerViewController.onPause on the viewController in Activity onPause

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Use this object to control configuration parameters of the Camera inside

Link copied to clipboard

Use this object to control configuration parameters of the Finder view inside

Link copied to clipboard

Use this object to control configuration parameters of the Polygon view inside

Link copied to clipboard

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

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(documentScanner: DocumentScanner, documentScannerResultHandler: DocumentScannerFrameHandler.ResultHandler?, callback: IDocumentScannerViewCallback?)

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