Class GenericDocumentCameraViewModel
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui.utils.Router
,io.scanbot.sdk.ui.view.genericdocument.IGenericDocumentCameraView.ViewModel
public final class GenericDocumentCameraViewModel implements IGenericDocumentCameraView.ViewModel, Router
Presenter for GenericDocumentCameraView
-
-
Field Summary
Fields Modifier and Type Field Description private final <Error class: unknown class><Boolean>
cameraOpened
private final <Error class: unknown class><Boolean>
stopNewFrames
private final <Error class: unknown class><Boolean>
flash
private final <Error class: unknown class><DocumentRecognitionStep>
scanningStep
private final <Error class: unknown class><Boolean>
onPermissionGranted
private final GenericDocumentRecognizer
scanner
-
Constructor Summary
Constructors Constructor Description GenericDocumentCameraViewModel(GenericDocumentScanningSession scanningSession, GenericDocumentRecognizer genericDocumentRecognizer)
-
Method Summary
Modifier and Type Method Description <Error class: unknown class><Boolean>
getCameraOpened()
<Error class: unknown class><Boolean>
getStopNewFrames()
<Error class: unknown class><Boolean>
getFlash()
<Error class: unknown class><DocumentRecognitionStep>
getScanningStep()
final <Error class: unknown class><Boolean>
getOnPermissionGranted()
GenericDocumentRecognizer
getScanner()
final Unit
pause()
Unit
onActivateCameraPermission()
User wants to activate camera permission Unit
onCancelClicked()
User wants to cancel snapping Unit
onFlashClicked()
User wants to change flash mode Unit
documentScanned(FrameHandlerResult<GenericDocumentRecognitionResult, SdkLicenseError> result)
User have scanned document Unit
setAcceptedDocumentTypes(List<RootDocumentType> documentTypes)
Accepted document types. final Unit
setFlashEnabled(Boolean flashEnabled)
Enables/Disables flash -
-
Constructor Detail
-
GenericDocumentCameraViewModel
GenericDocumentCameraViewModel(GenericDocumentScanningSession scanningSession, GenericDocumentRecognizer genericDocumentRecognizer)
-
-
Method Detail
-
getCameraOpened
<Error class: unknown class><Boolean> getCameraOpened()
-
getStopNewFrames
<Error class: unknown class><Boolean> getStopNewFrames()
-
getScanningStep
<Error class: unknown class><DocumentRecognitionStep> getScanningStep()
-
getOnPermissionGranted
final <Error class: unknown class><Boolean> getOnPermissionGranted()
-
getScanner
GenericDocumentRecognizer getScanner()
-
onActivateCameraPermission
Unit onActivateCameraPermission()
User wants to activate camera permission
-
onCancelClicked
Unit onCancelClicked()
User wants to cancel snapping
-
onFlashClicked
Unit onFlashClicked()
User wants to change flash mode
-
documentScanned
Unit documentScanned(FrameHandlerResult<GenericDocumentRecognitionResult, SdkLicenseError> result)
User have scanned document
-
setAcceptedDocumentTypes
Unit setAcceptedDocumentTypes(List<RootDocumentType> documentTypes)
Accepted document types. All other document types will be ignored.
By default - GenericDocumentRecognizer.ACCEPTED_TYPES.
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Enables/Disables flash
-
-
-
-