Package io.scanbot.sdk.ui.view.mrz
Class MrzCameraViewModel
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui.utils.Router
,io.scanbot.sdk.ui.view.mrz.IMRZCameraView.ViewModel
public final class MrzCameraViewModel implements IMRZCameraView.ViewModel, Router
View model for MRZCameraView
-
-
Field Summary
Fields Modifier and Type Field Description public final static Integer
KEPT_ACCUMULATED_FRAMES_COUNT
private Boolean
singleCodeScanningMode
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 MRZScanner
scanner
private final MRZScanner
mrzScanner
-
Constructor Summary
Constructors Constructor Description MrzCameraViewModel(MRZScanner mrzScanner, MrzScanningSession mrzScanningSession)
-
Method Summary
Modifier and Type Method Description final Boolean
getSingleCodeScanningMode()
Defines scanning mode. final Unit
setSingleCodeScanningMode(Boolean singleCodeScanningMode)
Defines scanning mode. <Error class: unknown class><Boolean>
getCameraOpened()
<Error class: unknown class><Boolean>
getStopNewFrames()
<Error class: unknown class><Boolean>
getFlash()
MRZScanner
getScanner()
final MRZScanner
getMrzScanner()
final Unit
pause()
Stops view model Unit
onCancelClicked()
User wants to cancel snapping Unit
onFlashClicked()
User wants to change flash mode Unit
mrzCodeScanned(FrameHandlerResult<MRZGenericDocument, SdkLicenseError> result)
User have scanned MRZ code final Unit
setFlashEnabled(Boolean flashEnabled)
Enables/Disables flash -
-
Constructor Detail
-
MrzCameraViewModel
MrzCameraViewModel(MRZScanner mrzScanner, MrzScanningSession mrzScanningSession)
-
-
Method Detail
-
getSingleCodeScanningMode
final Boolean getSingleCodeScanningMode()
Defines scanning mode. true - one scan, false - multiple scans.
-
setSingleCodeScanningMode
final Unit setSingleCodeScanningMode(Boolean singleCodeScanningMode)
Defines scanning mode. true - one scan, false - multiple scans.
-
getCameraOpened
<Error class: unknown class><Boolean> getCameraOpened()
-
getStopNewFrames
<Error class: unknown class><Boolean> getStopNewFrames()
-
getScanner
MRZScanner getScanner()
-
getMrzScanner
final MRZScanner getMrzScanner()
-
onCancelClicked
Unit onCancelClicked()
User wants to cancel snapping
-
onFlashClicked
Unit onFlashClicked()
User wants to change flash mode
-
mrzCodeScanned
Unit mrzCodeScanned(FrameHandlerResult<MRZGenericDocument, SdkLicenseError> result)
User have scanned MRZ code
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Enables/Disables flash
-
-
-
-