Package io.scanbot.sdk.ui.view.mc
Class MedicalCertificateCameraViewModel
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui.utils.Router
,io.scanbot.sdk.ui.view.mc.IMedicalCertificateRecognizerView.ViewModel
public final class MedicalCertificateCameraViewModel implements IMedicalCertificateRecognizerView.ViewModel, Router
Store McScanner 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 MedicalCertificateUserGuidanceStrings
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>
pictureProcessing
private final <Error class: unknown class><Boolean>
shouldProcessFrames
private final <Error class: unknown class><Boolean>
showErrorDialog
private Boolean
returnCroppedDocument
private Boolean
recognizePatientInfo
private MedicalCertificateRecognizer
scanner
-
Constructor Summary
Constructors Constructor Description MedicalCertificateCameraViewModel(MedicalCertificateRecognizer scanner, IDispatchersProvider dispatchersProvider, ResultRepository<MedicalCertificateRecognizerResult> resultRepository)
-
Method Summary
-
-
Constructor Detail
-
MedicalCertificateCameraViewModel
MedicalCertificateCameraViewModel(MedicalCertificateRecognizer scanner, IDispatchersProvider dispatchersProvider, ResultRepository<MedicalCertificateRecognizerResult> resultRepository)
-
-
Method Detail
-
getHintValues
final MedicalCertificateUserGuidanceStrings getHintValues()
-
setHintValues
final Unit setHintValues(MedicalCertificateUserGuidanceStrings hintValues)
-
getCameraOpened
<Error class: unknown class><Boolean> getCameraOpened()
-
getPictureProcessing
<Error class: unknown class><Boolean> getPictureProcessing()
-
getShouldProcessFrames
<Error class: unknown class><Boolean> getShouldProcessFrames()
-
getShowErrorDialog
<Error class: unknown class><Boolean> getShowErrorDialog()
-
getReturnCroppedDocument
final Boolean getReturnCroppedDocument()
-
setReturnCroppedDocument
final Unit setReturnCroppedDocument(Boolean returnCroppedDocument)
-
getRecognizePatientInfo
final Boolean getRecognizePatientInfo()
-
setRecognizePatientInfo
final Unit setRecognizePatientInfo(Boolean recognizePatientInfo)
-
getScanner
MedicalCertificateRecognizer getScanner()
-
setScanner
Unit setScanner(MedicalCertificateRecognizer scanner)
-
onCancelClicked
Unit onCancelClicked()
User wants to cancel snapping.
-
onRetryClicked
Unit onRetryClicked()
User wants to retry cm scanning.
-
onSnapping
Unit onSnapping()
On snapping after cm found successfully
-
onFlashClicked
Unit onFlashClicked()
User wants to change flash mode.
-
medicalCertificateSnapped
Unit medicalCertificateSnapped(ByteArray image, CaptureInfo captureInfo)
MC page is snapped
-
onResult
Unit onResult(FrameHandlerResult<MedicalCertificateRecognizerResult, SdkLicenseError> result)
On result frames comes from detector
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Toggles flash.
-
-
-
-