Class DocumentScannerView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource,io.scanbot.sdk.document.ui.IDocumentScannerView
public class DocumentScannerView extends FrameLayout implements IDocumentScannerView
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
-
-
Field Summary
Fields Modifier and Type Field Description private final IDocumentScannerViewControllerviewControllerprivate final IDocumentScannerViewCameraConfigurationcameraConfigurationprivate final IDocumentScannerPolygonViewControllerpolygonConfigurationprivate final IDocumentFinderViewControllerfinderViewController
-
Constructor Summary
Constructors Constructor Description DocumentScannerView(Context context, AttributeSet attrs)
-
Method Summary
Modifier and Type Method Description IDocumentScannerViewControllergetViewController()Use this object to control the state or the behavior of the IDocumentScannerView IDocumentScannerViewCameraConfigurationgetCameraConfiguration()Use this object to control configuration parameters of the Camera inside IDocumentScannerPolygonViewControllergetPolygonConfiguration()Use this object to control configuration parameters of the Polygon view inside IDocumentFinderViewControllergetFinderViewController()Use this object to control configuration parameters of the Finder view inside UnitinitCamera(CameraUiSettings cameraUiSettings)This must be called in the onCreate of the Activity UnitinitScanningBehavior(DocumentScanner documentScanner, DocumentScannerFrameHandler.ResultHandler documentScannerResultHandler, IDocumentScannerViewCallback callback)This should be called as soon as you have an instance of the document scanner. -
-
Constructor Detail
-
DocumentScannerView
DocumentScannerView(Context context, AttributeSet attrs)
-
-
Method Detail
-
getViewController
IDocumentScannerViewController getViewController()
Use this object to control the state or the behavior of the IDocumentScannerView
-
getCameraConfiguration
IDocumentScannerViewCameraConfiguration getCameraConfiguration()
Use this object to control configuration parameters of the Camera inside
-
getPolygonConfiguration
IDocumentScannerPolygonViewController getPolygonConfiguration()
Use this object to control configuration parameters of the Polygon view inside
-
getFinderViewController
IDocumentFinderViewController getFinderViewController()
Use this object to control configuration parameters of the Finder view inside
-
initCamera
Unit initCamera(CameraUiSettings cameraUiSettings)
This must be called in the onCreate of the Activity
-
initScanningBehavior
Unit initScanningBehavior(DocumentScanner documentScanner, DocumentScannerFrameHandler.ResultHandler documentScannerResultHandler, IDocumentScannerViewCallback callback)
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
-
-
-
-