ViewModel

interface ViewModel

Notified about user interactions.

Inheritors

Types

Link copied to clipboard

Enum represents state of result confirmation dialog state for correct acting on it in view.

Properties

Link copied to clipboard
abstract val autoSnapEnabled: <Error class: unknown class><Boolean>
Link copied to clipboard
abstract val barcodeFilter: <Error class: unknown class><IBarcodeFilter>
Link copied to clipboard
abstract val cameraOpened: <Error class: unknown class><Boolean>
Link copied to clipboard
abstract val confirmationState: <Error class: unknown class><IBarcodeCameraView.ViewModel.ConfirmationState>
Link copied to clipboard
abstract val flash: <Error class: unknown class><Boolean>
Link copied to clipboard
abstract val scanner: BarcodeScanner
Link copied to clipboard
abstract val stopNewFrames: <Error class: unknown class><Boolean>

Functions

Link copied to clipboard

User have scanned barcode.

Link copied to clipboard
abstract fun onCameraOpened()

Camera has been opened.

Link copied to clipboard
abstract fun onCancelClicked()

User wants to cancel snapping.

Link copied to clipboard
abstract fun onConfirmationRemoved()

View has removed confirmation dialog (to restart scanning), preview resumed. ViewModel is now to adjust its state accordingly.

Link copied to clipboard
abstract fun onFlashClicked()

User wants to change flash mode.

Link copied to clipboard
abstract fun onRestartScanning()

Scanning result confirmation dialogue finished.

Link copied to clipboard

User was shown scanning result confirmation dialogue and we are waiting for his response.

Link copied to clipboard

Barcode scanning result was confirmed in the confirmation dialog.

Link copied to clipboard

When the barcode was clicked on the Barcode selection overlay layer.

Link copied to clipboard
abstract fun pageSnapped(image: ByteArray, imageOrientation: Int)

User have snapped an image.

Link copied to clipboard
abstract fun setAustraliaPostCustomerFormat(australiaPostCustomerFormat: AustraliaPostCustomerFormat)

The australia post customer format. The default value is AustraliaPostCustomerFormat.ALPHA_NUMERIC.

Link copied to clipboard
abstract fun setAutoCancelTimeout(timeoutInSeconds: Int)

Sets auto close timer in seconds. 0 = disabled and it is the default value.

Link copied to clipboard
abstract fun setAutomaticSelectionEnabled(enabled: Boolean)

If true - first successfully scanned barcode will be automatically selected in AR overlay and returned as a result, false - default AR overlay behaviour.

Link copied to clipboard
abstract fun setAutoStopOnSuccess(enabled: Boolean)

Set if presenter need to stop snapping after first success.

Link copied to clipboard
abstract fun setBarcodeFilter(barcodeFilter: IBarcodeFilter)

Set the IBarcodeFilter implementation instance to filter accepted scanned barcodes.

Link copied to clipboard
abstract fun setBarcodeFormatsFilter(barcodeFormats: List<BarcodeFormat>)

Set barcode format to scan

Link copied to clipboard
abstract fun setConfirmationDialogEnabled(enabled: Boolean)

Enables or disables showing of the confirmation dialog after barcode scanning. By default it is disabled.

Link copied to clipboard
abstract fun setDelayAfterScanMs(ms: Long)

Sets a delay after scan in ms. 0 = disabled and it is the default value

Link copied to clipboard
abstract fun setEngineMode(engineMode: BarcodeScannerEngineMode)

Allows to set custom BarcodeScannerEngineMode for the barcode scanning.

Link copied to clipboard
Link copied to clipboard
abstract fun setGs1HandlingMode(gs1Handling: Gs1Handling)

GS1 Codes Handling mode. The default value is Gs1Handling.PARSE.

Link copied to clipboard
abstract fun setInitialScanDelayMs(ms: Long)

Sets initial scan timeout in ms. 0 = disabled and it is the default value

Link copied to clipboard
abstract fun setLowPowerMode(lowPowerMode: Boolean)

If true, enabled the mode which slightly decreases the scanning quality and the energy consumption, and increases the scanning speed. If false - mode is disabled. The default is false

Link copied to clipboard
abstract fun setMaximumTextLength(maximumTextLength: Int)

Set maximum text length of the scanned 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!

Link copied to clipboard
abstract fun setMinimum1DQuietZoneSize(minimum1DQuietZoneSize: Int)

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!

Link copied to clipboard
abstract fun setMinimumTextLength(minimumTextLength: Int)

Set minimum required text length of the scanned barcode. The default value is 0 (the setting is turned off). NOTE: Currently works for ITF and MSI Plessey barcodes only!

Link copied to clipboard
abstract fun setMsiPlesseyChecksumAlgorithms(msiPlesseyChecksumAlgorithms: List<MsiPlesseyChecksumAlgorithm>)

The checksum algorithms for MSI Plessey barcodes. The default value is MSIPlesseyChecksumAlgorithm.Mod10.

Link copied to clipboard
abstract fun setStripCheckDigits(stripCheckDigits: Boolean)

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

Link copied to clipboard
abstract fun setUseCode11Checksum(useCode11Checksum: Boolean)

If true, the Code 11 barcode checksum is used. Default is true

Link copied to clipboard
abstract fun setUseIata2Of5Checksum(useIata2Of5Checksum: Boolean)

If true, the IATA 2 of 5 barcode checksum is used. Default is true