Package io.scanbot.sdk.ui.view.check
Class CheckCameraViewModel
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui.utils.Router
,io.scanbot.sdk.ui.view.check.ICheckRecognizerView.ViewModel
public final class CheckCameraViewModel implements ICheckRecognizerView.ViewModel, Router
Store CheckRecognizer view's state and transport user interactions to it.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Integer
FIRST_HINT_DELAY_TIME
private CheckUserGuidanceStrings
hintValues
private final <Error class: unknown class><Boolean>
cameraOpened
private final <Error class: unknown class><String>
hint
private final <Error class: unknown class><Boolean>
flash
private final <Error class: unknown class><Boolean>
shouldProcessFrames
private final <Error class: unknown class><Boolean>
pictureProcessing
private <Error class: unknown class><Boolean>
captureHighResolutionImage
private final CheckRecognizer
checkRecognizer
private final ContourDetector
contourDetector
-
Constructor Summary
Constructors Constructor Description CheckCameraViewModel(CheckRecognizer checkRecognizer, ContourDetector contourDetector, IDispatchersProvider dispatchersProvider, ResultRepository<CheckRecognizerResult> resultRepository)
-
Method Summary
Modifier and Type Method Description final CheckUserGuidanceStrings
getHintValues()
final Unit
setHintValues(CheckUserGuidanceStrings hintValues)
<Error class: unknown class><Boolean>
getCameraOpened()
<Error class: unknown class><String>
getHint()
<Error class: unknown class><Boolean>
getFlash()
<Error class: unknown class><Boolean>
getShouldProcessFrames()
<Error class: unknown class><Boolean>
getPictureProcessing()
<Error class: unknown class><Boolean>
getCaptureHighResolutionImage()
Unit
)>setCaptureHighResolutionImage(<Error class: unknown class><Boolean> captureHighResolutionImage)
CheckRecognizer
getCheckRecognizer()
ContourDetector
getContourDetector()
final Unit
pause()
Unit
setAcceptedCheckStandards(List<RootDocumentType> acceptedCheckStandards)
User wants to set a list of accepted Check standards for the recognition. Unit
onCancelClicked()
User wants to cancel snapping. Unit
onFlashClicked()
User wants to change flash mode. Unit
onSnapping()
On snapping after check found successfully Unit
onCheckRecognized(FrameHandlerResult<CheckRecognizerResult, SdkLicenseError> result)
On result frames comes from detector Unit
onCheckSnapped(ByteArray image, CaptureInfo captureInfo)
On Check snapped final Unit
setFlashEnabled(Boolean flashEnabled)
Toggles flash. final Unit
setCaptureHighResolutionImage(Boolean captureHighResolutionImage)
Enables/disables high quality image capturing. -
-
Constructor Detail
-
CheckCameraViewModel
CheckCameraViewModel(CheckRecognizer checkRecognizer, ContourDetector contourDetector, IDispatchersProvider dispatchersProvider, ResultRepository<CheckRecognizerResult> resultRepository)
-
-
Method Detail
-
getHintValues
final CheckUserGuidanceStrings getHintValues()
-
setHintValues
final Unit setHintValues(CheckUserGuidanceStrings hintValues)
-
getCameraOpened
<Error class: unknown class><Boolean> getCameraOpened()
-
getShouldProcessFrames
<Error class: unknown class><Boolean> getShouldProcessFrames()
-
getPictureProcessing
<Error class: unknown class><Boolean> getPictureProcessing()
-
getCaptureHighResolutionImage
<Error class: unknown class><Boolean> getCaptureHighResolutionImage()
-
setCaptureHighResolutionImage
Unit )>setCaptureHighResolutionImage(<Error class: unknown class><Boolean> captureHighResolutionImage)
-
getCheckRecognizer
CheckRecognizer getCheckRecognizer()
-
getContourDetector
ContourDetector getContourDetector()
-
setAcceptedCheckStandards
Unit setAcceptedCheckStandards(List<RootDocumentType> acceptedCheckStandards)
User wants to set a list of accepted Check standards for the recognition.
-
onCancelClicked
Unit onCancelClicked()
User wants to cancel snapping.
-
onFlashClicked
Unit onFlashClicked()
User wants to change flash mode.
-
onSnapping
Unit onSnapping()
On snapping after check found successfully
-
onCheckRecognized
Unit onCheckRecognized(FrameHandlerResult<CheckRecognizerResult, SdkLicenseError> result)
On result frames comes from detector
-
onCheckSnapped
Unit onCheckSnapped(ByteArray image, CaptureInfo captureInfo)
On Check snapped
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Toggles flash.
-
setCaptureHighResolutionImage
final Unit setCaptureHighResolutionImage(Boolean captureHighResolutionImage)
Enables/disables high quality image capturing.
-
-
-
-