Interface IBarcodeCameraView.ViewModel
-
- All Implemented Interfaces:
public interface IBarcodeCameraView.ViewModel
Notified about user interactions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
IBarcodeCameraView.ViewModel.ConfirmationState
Enum represents state of result confirmation dialog state for correct acting on it in view.
-
Method Summary
Modifier and Type Method Description abstract Unit
onCameraOpened()
Camera has been opened. abstract Unit
onCancelClicked()
User wants to cancel snapping. abstract Unit
setAutoStopOnSuccess(Boolean enabled)
Set if presenter need to stop snapping after first success. abstract Unit
onFlashClicked()
User wants to change flash mode. abstract Unit
setConfirmationDialogEnabled(Boolean enabled)
Enables or disables showing of the confirmation dialog after barcode scanning. abstract Unit
onResultConfirmationPending()
User was shown scanning result confirmation dialogue and we are waiting for his response. abstract Unit
onConfirmationRemoved()
View has removed confirmation dialog (to restart scanning), preview resumed. abstract Unit
onRestartScanning()
Scanning result confirmation dialogue finished. abstract Unit
onResultConfirmed(BarcodeScanningResult result)
Barcode scanning result was confirmed in the confirmation dialog. abstract Unit
barcodeScanned(FrameHandlerResult<BarcodeScanningResult, SdkLicenseError> result)
User have scanned barcode abstract Unit
onSelectionOverlayBarcodeClicked(BarcodeItem barcodeItem)
When the barcode was clicked on the Barcode selection overlay layer abstract Unit
pageSnapped(ByteArray image, Integer imageOrientation)
User have snapped an image abstract Unit
setAutoCancelTimeout(Integer timeoutInSeconds)
Sets auto close timer in seconds. abstract Unit
setInitialScanDelayMs(Long ms)
Sets initial scan timeout in ms. abstract Unit
setDelayAfterScanMs(Long ms)
Sets a delay after scan in ms. abstract Unit
setAutomaticSelectionEnabled(Boolean enabled)
If true - first successfully detected barcode will be automatically selected in AR overlay and returned as a result, false - default AR overlay behaviour. abstract Unit
setBarcodeFormatsFilter(List<BarcodeFormat> barcodeFormats)
Set barcode format to scan abstract Unit
setAcceptedDocumentFormats(List<BarcodeDocumentFormat> formats)
Sets list of BarcodeDocumentFormat to scan abstract Unit
setEngineMode(EngineMode engineMode)
Allows to set custom EngineMode for the barcode detection EngineMode.NextGen is used by default abstract Unit
setMinimumTextLength(Integer minimumTextLength)
Set minimum required text length of the detected barcode. abstract Unit
setMaximumTextLength(Integer maximumTextLength)
Set maximum text length of the detected barcode. abstract Unit
setMinimum1DQuietZoneSize(Integer minimum1DQuietZoneSize)
Set minimum required quiet zone on the barcode. abstract Unit
setGs1HandlingMode(Gs1Handling gs1Handling)
GS1 Codes Handling mode. abstract Unit
setMsiPlesseyChecksumAlgorithms(EnumSet<MSIPlesseyChecksumAlgorithm> msiPlesseyChecksumAlgorithms)
The checksum algorithms for MSI Plessey barcodes. abstract Unit
setStripCheckDigits(Boolean stripCheckDigits)
If true, check digits for UPC, EAN and MSI Plessey codes are removed from result. abstract Unit
setLowPowerMode(Boolean lowPowerMode)
If true
, enabled the mode which slightly decreases the scanning quality and the energy consumption, and increases the scanning speed.abstract Unit
setUseIata2Of5Checksum(Boolean useIata2Of5Checksum)
If true
, the IATA 2 of 5 barcode checksum is used.abstract Unit
setUseCode11Checksum(Boolean useCode11Checksum)
If true
, the Code 11 barcode checksum is used.abstract Unit
setAustraliaPostCustomerFormat(AustraliaPostCustomerFormat australiaPostCustomerFormat)
The australia post customer format. abstract Unit
setBarcodeFilter(IBarcodeFilter barcodeFilter)
Set the IBarcodeFilter
implementation instance to filter accepted scanned barcodes.abstract ScanbotBarcodeDetector
getScanner()
abstract <Error class: unknown class><Boolean>
getCameraOpened()
abstract <Error class: unknown class><Boolean>
getStopNewFrames()
abstract <Error class: unknown class><Boolean>
getFlash()
abstract <Error class: unknown class><Boolean>
getAutoSnapEnabled()
abstract <Error class: unknown class><IBarcodeFilter>
getBarcodeFilter()
abstract <Error class: unknown class><IBarcodeCameraView.ViewModel.ConfirmationState>
getConfirmationState()
-
-
Method Detail
-
onCameraOpened
abstract Unit onCameraOpened()
Camera has been opened.
-
onCancelClicked
abstract Unit onCancelClicked()
User wants to cancel snapping.
-
setAutoStopOnSuccess
abstract Unit setAutoStopOnSuccess(Boolean enabled)
Set if presenter need to stop snapping after first success.
-
onFlashClicked
abstract Unit onFlashClicked()
User wants to change flash mode.
-
setConfirmationDialogEnabled
abstract Unit setConfirmationDialogEnabled(Boolean enabled)
Enables or disables showing of the confirmation dialog after barcode scanning. By default it is disabled.
-
onResultConfirmationPending
abstract Unit onResultConfirmationPending()
User was shown scanning result confirmation dialogue and we are waiting for his response.
-
onConfirmationRemoved
abstract Unit onConfirmationRemoved()
View has removed confirmation dialog (to restart scanning), preview resumed. ViewModel is now to adjust its state accordingly.
-
onRestartScanning
abstract Unit onRestartScanning()
Scanning result confirmation dialogue finished.
-
onResultConfirmed
abstract Unit onResultConfirmed(BarcodeScanningResult result)
Barcode scanning result was confirmed in the confirmation dialog.
-
barcodeScanned
abstract Unit barcodeScanned(FrameHandlerResult<BarcodeScanningResult, SdkLicenseError> result)
User have scanned barcode
-
onSelectionOverlayBarcodeClicked
abstract Unit onSelectionOverlayBarcodeClicked(BarcodeItem barcodeItem)
When the barcode was clicked on the Barcode selection overlay layer
-
pageSnapped
abstract Unit pageSnapped(ByteArray image, Integer imageOrientation)
User have snapped an image
- Parameters:
image
- snapped imageimageOrientation
- snapped image orientation
-
setAutoCancelTimeout
abstract Unit setAutoCancelTimeout(Integer timeoutInSeconds)
Sets auto close timer in seconds. 0 = disabled and it is the default value.
-
setInitialScanDelayMs
abstract Unit setInitialScanDelayMs(Long ms)
Sets initial scan timeout in ms. 0 = disabled and it is the default value
-
setDelayAfterScanMs
abstract Unit setDelayAfterScanMs(Long ms)
Sets a delay after scan in ms. 0 = disabled and it is the default value
-
setAutomaticSelectionEnabled
abstract Unit setAutomaticSelectionEnabled(Boolean enabled)
If true - first successfully detected barcode will be automatically selected in AR overlay and returned as a result, false - default AR overlay behaviour. By default - false.
-
setBarcodeFormatsFilter
abstract Unit setBarcodeFormatsFilter(List<BarcodeFormat> barcodeFormats)
Set barcode format to scan
- Parameters:
barcodeFormats
- List of BarcodeFormat to scan
-
setAcceptedDocumentFormats
abstract Unit setAcceptedDocumentFormats(List<BarcodeDocumentFormat> formats)
Sets list of BarcodeDocumentFormat to scan
- Parameters:
formats
- accepted document formats
-
setEngineMode
abstract Unit setEngineMode(EngineMode engineMode)
Allows to set custom EngineMode for the barcode detection EngineMode.NextGen is used by default
- Parameters:
engineMode
- of the detector to use
-
setMinimumTextLength
abstract Unit setMinimumTextLength(Integer minimumTextLength)
Set minimum required text length of the detected barcode. The default value is 0 (the setting is turned off). NOTE: Currently works for ITF and MSI Plessey barcodes only!
-
setMaximumTextLength
abstract Unit setMaximumTextLength(Integer maximumTextLength)
Set maximum text length of the detected barcode. Setting to zero removes the limit. The default value is 0 (the setting is turned off). NOTE: Currently works for ITF and MSI Plessey barcodes only!
-
setMinimum1DQuietZoneSize
abstract Unit setMinimum1DQuietZoneSize(Integer minimum1DQuietZoneSize)
Set minimum required quiet zone on the barcode. Measured in modules (the size of a minimal bar on the barcode). The default value is 10. NOTE: Currently works for ITF and MSI Plessey barcodes only!
-
setGs1HandlingMode
abstract Unit setGs1HandlingMode(Gs1Handling gs1Handling)
GS1 Codes Handling mode. The default value is Gs1Handling.PARSE.
-
setMsiPlesseyChecksumAlgorithms
abstract Unit setMsiPlesseyChecksumAlgorithms(EnumSet<MSIPlesseyChecksumAlgorithm> msiPlesseyChecksumAlgorithms)
The checksum algorithms for MSI Plessey barcodes. The default value is MSIPlesseyChecksumAlgorithm.Mod10.
-
setStripCheckDigits
abstract Unit setStripCheckDigits(Boolean stripCheckDigits)
If true, check digits for UPC, EAN and MSI Plessey codes are removed from result. Has no effect if both single and double digit MSI Plessey checksums are enabled. The default is
false
-
setLowPowerMode
abstract Unit setLowPowerMode(Boolean lowPowerMode)
If
true
, enabled the mode which slightly decreases the scanning quality and the energy consumption, and increases the scanning speed. Iffalse
- mode is disabled. The default isfalse
-
setUseIata2Of5Checksum
abstract Unit setUseIata2Of5Checksum(Boolean useIata2Of5Checksum)
If
true
, the IATA 2 of 5 barcode checksum is used. Default istrue
-
setUseCode11Checksum
abstract Unit setUseCode11Checksum(Boolean useCode11Checksum)
If
true
, the Code 11 barcode checksum is used. Default istrue
-
setAustraliaPostCustomerFormat
abstract Unit setAustraliaPostCustomerFormat(AustraliaPostCustomerFormat australiaPostCustomerFormat)
The australia post customer format. The default value is AustraliaPostCustomerFormat.ALPHA_NUMERIC.
-
setBarcodeFilter
abstract Unit setBarcodeFilter(IBarcodeFilter barcodeFilter)
Set the
IBarcodeFilter
implementation instance to filter accepted scanned barcodes.
-
getScanner
abstract ScanbotBarcodeDetector getScanner()
-
getCameraOpened
abstract <Error class: unknown class><Boolean> getCameraOpened()
-
getStopNewFrames
abstract <Error class: unknown class><Boolean> getStopNewFrames()
-
getAutoSnapEnabled
abstract <Error class: unknown class><Boolean> getAutoSnapEnabled()
-
getBarcodeFilter
abstract <Error class: unknown class><IBarcodeFilter> getBarcodeFilter()
-
getConfirmationState
abstract <Error class: unknown class><IBarcodeCameraView.ViewModel.ConfirmationState> getConfirmationState()
-
-
-
-