Class GenericDocumentCameraView
-
- 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.camera.BaseResultHandler
,io.scanbot.sdk.genericdocument.GenericDocumentRecognizerFrameHandler.ResultHandler
,io.scanbot.sdk.ui.view.genericdocument.IGenericDocumentCameraView
public final class GenericDocumentCameraView extends FrameLayout implements IGenericDocumentCameraView, GenericDocumentRecognizerFrameHandler.ResultHandler
Represents camera view for GenericDocumentRecognizer scanner.
-
-
Field Summary
Fields Modifier and Type Field Description private GenericDocumentViewConfiguration
appearanceConfiguration
-
Constructor Summary
Constructors Constructor Description GenericDocumentCameraView(Context context, AttributeSet attrs)
-
Method Summary
Modifier and Type Method Description final GenericDocumentViewConfiguration
getAppearanceConfiguration()
final Unit
setAppearanceConfiguration(GenericDocumentViewConfiguration appearanceConfiguration)
Unit
attachPermissionViewModel(IPermissionViewModel viewModel)
Unit
attachViewModel(IGenericDocumentCameraView.ViewModel viewModel)
Unit
setCameraOrientationMode(CameraOrientationMode cameraOrientationMode)
Sets camera orientation mode Unit
setCameraModule(CameraModule cameraModule)
Set camera module final Unit
setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
Boolean
handle(FrameHandlerResult<GenericDocumentRecognitionResult, SdkLicenseError> result)
Called every time contour detection was performed on a frame. -
-
Constructor Detail
-
GenericDocumentCameraView
GenericDocumentCameraView(Context context, AttributeSet attrs)
-
-
Method Detail
-
getAppearanceConfiguration
final GenericDocumentViewConfiguration getAppearanceConfiguration()
-
setAppearanceConfiguration
final Unit setAppearanceConfiguration(GenericDocumentViewConfiguration appearanceConfiguration)
-
attachPermissionViewModel
Unit attachPermissionViewModel(IPermissionViewModel viewModel)
- Parameters:
viewModel
- which will handle permissions
-
attachViewModel
Unit attachViewModel(IGenericDocumentCameraView.ViewModel viewModel)
- Parameters:
viewModel
- which will receive callbacks on user interactions.
-
setCameraOrientationMode
Unit setCameraOrientationMode(CameraOrientationMode cameraOrientationMode)
Sets camera orientation mode
- Parameters:
cameraOrientationMode
- CameraOrientationMode.LANDSCAPE or CameraOrientationMode.PORTRAIT
-
setCameraModule
Unit setCameraModule(CameraModule cameraModule)
Set camera module
- Parameters:
cameraModule
- one of the supported modes - CameraModule
-
setCameraPreviewMode
final Unit setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
-
handle
Boolean handle(FrameHandlerResult<GenericDocumentRecognitionResult, SdkLicenseError> result)
Called every time contour detection was performed on a frame.
- Parameters:
result
- information about detection results on a single frame
-
-
-
-