BarcodeScannerConfiguration

data class BarcodeScannerConfiguration(var barcodeFormatConfigurations: List<BarcodeFormatConfigurationBase> = listOf( BarcodeFormatCommonConfiguration( ) ), 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 returnBarcodeImage: Boolean = false, var engineMode: BarcodeScannerEngineMode = BarcodeScannerEngineMode.NEXT_GEN, var accumulationConfig: BarcodeAccumulationConfiguration = BarcodeAccumulationConfiguration( ), var optimizedForOverlays: Boolean = false) : Parcelable

Configuration for the barcode scanner.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(barcodeFormatConfigurations: List<BarcodeFormatConfigurationBase> = listOf( BarcodeFormatCommonConfiguration( ) ), 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, returnBarcodeImage: Boolean = false, engineMode: BarcodeScannerEngineMode = BarcodeScannerEngineMode.NEXT_GEN, accumulationConfig: BarcodeAccumulationConfiguration = BarcodeAccumulationConfiguration( ), optimizedForOverlays: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Configuration to accumulate barcodes across multiple frames in live mode.

Link copied to clipboard
Link copied to clipboard

The engine mode for barcode scanning.

Link copied to clipboard

List of document formats to be extracted. Barcodes that decode to one of the extracted document formats will have extractedDocument field in BarcodeItem populated with the parsed document. By default all supported barcode document formats are accepted. If empty, no barcodes will be parsed into documents. To only accept the document formats listed in extractedDocumentFormats, the property onlyAcceptDocuments must be true.

Link copied to clipboard

If true and extractedDocumentFormats is not empty, then barcodes that don't decode to one of the extracted document formats will be ignored.

Link copied to clipboard

If true, the quads of linear (1D) barcodes will be further refined to more closely match the barcode's outline in the input image. This will also produce stabler barcode outlines across frames for use cases such as AR.

Link copied to clipboard

If true, the barcode image will be returned in the BarcodeItem.

Functions

Link copied to clipboard
Link copied to clipboard
fun BarcodeScannerConfiguration.setBarcodeFormats(barcodeFormats: List<BarcodeFormat> = BarcodeFormatCommonConfiguration.default().formats)

Simplified extension configuration function that set the list of barcode formats to scan. By default, the most commonly used formats are enabled. Overrides BarcodeScannerConfiguration.barcodeFormatConfigurations list of configurations.

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