BarcodeScannerConfiguration

data class BarcodeScannerConfiguration(var extractedDocumentFormats: List<BarcodeDocumentFormat> = listOf( BarcodeDocumentFormat.AAMVA, BarcodeDocumentFormat.BOARDING_PASS, BarcodeDocumentFormat.DE_MEDICAL_PLAN, BarcodeDocumentFormat.MEDICAL_CERTIFICATE, BarcodeDocumentFormat.ID_CARD_PDF_417, BarcodeDocumentFormat.SEPA, BarcodeDocumentFormat.SWISS_QR, BarcodeDocumentFormat.VCARD, BarcodeDocumentFormat.GS1, BarcodeDocumentFormat.HIBC ), var onlyAcceptDocuments: Boolean = false, var extensions: UpcEanExtensionBehavior = UpcEanExtensionBehavior.ALLOW_ANY, var barcodesRegexFilter: String = "", var minimumSizeScore: Double = 0.0, var minimumTextLength: Int = 0, var maximumTextLength: Int = 0, var minimum1DBarcodesQuietZone: Int = 10, var stripCheckDigits: Boolean = false, var useIATA2OF5Checksum: Boolean = true, var useCode11Checksum: Boolean = true, var barcodeFormats: List<BarcodeFormat> = listOf( BarcodeFormat.AZTEC, BarcodeFormat.CODABAR, BarcodeFormat.CODE_39, BarcodeFormat.CODE_93, BarcodeFormat.CODE_128, BarcodeFormat.DATA_MATRIX, BarcodeFormat.DATABAR, BarcodeFormat.DATABAR_EXPANDED, BarcodeFormat.DATABAR_LIMITED, BarcodeFormat.EAN_13, BarcodeFormat.EAN_8, BarcodeFormat.ITF, BarcodeFormat.MICRO_QR_CODE, BarcodeFormat.PDF_417, BarcodeFormat.QR_CODE, BarcodeFormat.UPC_A, BarcodeFormat.UPC_E ), var msiPlesseyChecksumAlgorithm: MsiPlesseyChecksumAlgorithm = MsiPlesseyChecksumAlgorithm.MOD_10, var australiaPostCustomerFormat: AustraliaPostCustomerFormat = AustraliaPostCustomerFormat.ALPHA_NUMERIC, var lowPowerMode: Boolean = false, var gs1Handling: Gs1Handling = Gs1Handling.PARSE, var returnBarcodeImage: Boolean = true) : Parcelable

Configuration of the scanning behavior.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(extractedDocumentFormats: List<BarcodeDocumentFormat> = listOf( BarcodeDocumentFormat.AAMVA, BarcodeDocumentFormat.BOARDING_PASS, BarcodeDocumentFormat.DE_MEDICAL_PLAN, BarcodeDocumentFormat.MEDICAL_CERTIFICATE, BarcodeDocumentFormat.ID_CARD_PDF_417, BarcodeDocumentFormat.SEPA, BarcodeDocumentFormat.SWISS_QR, BarcodeDocumentFormat.VCARD, BarcodeDocumentFormat.GS1, BarcodeDocumentFormat.HIBC ), onlyAcceptDocuments: Boolean = false, extensions: UpcEanExtensionBehavior = UpcEanExtensionBehavior.ALLOW_ANY, barcodesRegexFilter: String = "", minimumSizeScore: Double = 0.0, minimumTextLength: Int = 0, maximumTextLength: Int = 0, minimum1DBarcodesQuietZone: Int = 10, stripCheckDigits: Boolean = false, useIATA2OF5Checksum: Boolean = true, useCode11Checksum: Boolean = true, barcodeFormats: List<BarcodeFormat> = listOf( BarcodeFormat.AZTEC, BarcodeFormat.CODABAR, BarcodeFormat.CODE_39, BarcodeFormat.CODE_93, BarcodeFormat.CODE_128, BarcodeFormat.DATA_MATRIX, BarcodeFormat.DATABAR, BarcodeFormat.DATABAR_EXPANDED, BarcodeFormat.DATABAR_LIMITED, BarcodeFormat.EAN_13, BarcodeFormat.EAN_8, BarcodeFormat.ITF, BarcodeFormat.MICRO_QR_CODE, BarcodeFormat.PDF_417, BarcodeFormat.QR_CODE, BarcodeFormat.UPC_A, BarcodeFormat.UPC_E ), msiPlesseyChecksumAlgorithm: MsiPlesseyChecksumAlgorithm = MsiPlesseyChecksumAlgorithm.MOD_10, australiaPostCustomerFormat: AustraliaPostCustomerFormat = AustraliaPostCustomerFormat.ALPHA_NUMERIC, lowPowerMode: Boolean = false, gs1Handling: Gs1Handling = Gs1Handling.PARSE, returnBarcodeImage: Boolean = true)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The customer format used in AUSTRALIA_POST codes. The default value is ALPHA_NUMERIC.

Link copied to clipboard

List of accepted barcode symbologies.

Link copied to clipboard

Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). This option overrides barcodesExtensionFilter option.

Link copied to clipboard

Filter for extended EAN and UPC barcodes.

Link copied to clipboard

List of document formats to be extracted.

Link copied to clipboard

The expected way of handling GS1_COMPOSITE barcodes.

Link copied to clipboard

If true, enables a mode that slightly decreases scanning quality and energy consumption. Increases scanning speed. If false, the mode is disabled. The default is false. Android only.

Link copied to clipboard

Optional maximum text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only.

Link copied to clipboard

Optional minimum required quiet zone on the barcode. Measured in modules (the smallest bar size on a barcode). The default is 10. NOTE - This feature works on ITF barcodes only.

Link copied to clipboard

Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is.

Link copied to clipboard

Optional minimum required text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only.

Link copied to clipboard

Checksum algorithm used for MSI Plessey barcodes. The default value is MOD_10.

Link copied to clipboard

If true and extractedDocumentFormats is not empty, then barcodes that do not decode to one of the accepted document formats will be ignored.

Link copied to clipboard

If true, the barcode image is returned in the result.

Link copied to clipboard

If true, check digits for UPC, EAN and MSI Plessey codes are removed from the result. Has no effect if both single and double digit MSI Plessey checksums are enabled. The default is false.

Link copied to clipboard

If true, the optional check digit for CODE_11 codes is used in validation. The default is true.

Link copied to clipboard

If true, the optional check digit for IATA_2_OF_5 codes is used in validation. The default is true.

Functions

Link copied to clipboard
Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JSONObject