Class TextDataCameraView
-
- 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.generictext.GenericTextRecognizerFrameHandler.ResultHandler
,io.scanbot.sdk.ui.view.generictext.ITextDataCameraView
public final class TextDataCameraView extends FrameLayout implements ITextDataCameraView, GenericTextRecognizerFrameHandler.ResultHandler
Represents camera view for Data Scanner aka GenericTextRecognizer screen of the application.
-
-
Constructor Summary
Constructors Constructor Description TextDataCameraView(Context context, AttributeSet attrs)
-
Method Summary
Modifier and Type Method Description Unit
attachViewModel(ITextDataCameraView.ViewModel viewModel)
Unit
attachPermissionViewModel(IPermissionViewModel viewModel)
Boolean
handle(FrameHandlerResult<GenericTextRecognitionResult, SdkLicenseError> result)
Called every time contour detection was performed on a frame. Unit
setCameraOrientationMode(CameraOrientationMode cameraOrientationMode)
Sets camera orientation mode. Unit
setCameraModule(CameraModule cameraModule)
Set camera module. final Unit
setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
final Unit
configureScannerForStep(TextDataScannerStep step)
-
-
Constructor Detail
-
TextDataCameraView
TextDataCameraView(Context context, AttributeSet attrs)
-
-
Method Detail
-
attachViewModel
Unit attachViewModel(ITextDataCameraView.ViewModel viewModel)
- Parameters:
viewModel
- which will receive callbacks on user interactions.
-
attachPermissionViewModel
Unit attachPermissionViewModel(IPermissionViewModel viewModel)
- Parameters:
viewModel
- which will handle permissions
-
handle
Boolean handle(FrameHandlerResult<GenericTextRecognitionResult, SdkLicenseError> result)
Called every time contour detection was performed on a frame.
- Parameters:
result
- information about detection results on a single frame
-
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)
-
configureScannerForStep
final Unit configureScannerForStep(TextDataScannerStep step)
-
-
-
-