Class BarcodeScannerConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class BarcodeScannerConfiguration implements Parcelable
Configuration for the barcode scanner.
-
-
Field Summary
Fields Modifier and Type Field Description private List<BarcodeFormatConfigurationBase>barcodeFormatConfigurationsprivate List<BarcodeDocumentFormat>extractedDocumentFormatsprivate BooleanonlyAcceptDocumentsprivate BooleanreturnBarcodeImageprivate BarcodeScannerEngineModeengineModeprivate BooleanoptimizedForOverlays
-
Constructor Summary
Constructors Constructor Description BarcodeScannerConfiguration(Map<String, Object> source)BarcodeScannerConfiguration(JSONObject json)BarcodeScannerConfiguration(List<BarcodeFormatConfigurationBase> barcodeFormatConfigurations, List<BarcodeDocumentFormat> extractedDocumentFormats, Boolean onlyAcceptDocuments, Boolean returnBarcodeImage, BarcodeScannerEngineMode engineMode, Boolean optimizedForOverlays)
-
Method Summary
Modifier and Type Method Description final List<BarcodeFormatConfigurationBase>getBarcodeFormatConfigurations()Options for barcode decoding. final UnitsetBarcodeFormatConfigurations(List<BarcodeFormatConfigurationBase> barcodeFormatConfigurations)Options for barcode decoding. final List<BarcodeDocumentFormat>getExtractedDocumentFormats()List of document formats to be extracted. final UnitsetExtractedDocumentFormats(List<BarcodeDocumentFormat> extractedDocumentFormats)List of document formats to be extracted. final BooleangetOnlyAcceptDocuments()If true and extractedDocumentFormats is not empty, then barcodes that don't decode to one of the extracted document formats will be ignored. final UnitsetOnlyAcceptDocuments(Boolean onlyAcceptDocuments)If true and extractedDocumentFormats is not empty, then barcodes that don't decode to one of the extracted document formats will be ignored. final BooleangetReturnBarcodeImage()If true, the barcode image will be returned in the BarcodeItem. final UnitsetReturnBarcodeImage(Boolean returnBarcodeImage)If true, the barcode image will be returned in the BarcodeItem. final BarcodeScannerEngineModegetEngineMode()The engine mode for barcode scanning. final UnitsetEngineMode(BarcodeScannerEngineMode engineMode)The engine mode for barcode scanning. final BooleangetOptimizedForOverlays()If true, the quads of linear (1D) barcodes will be further refined to more closely match the barcode's outline in the input image. final UnitsetOptimizedForOverlays(Boolean optimizedForOverlays)If true, the quads of linear (1D) barcodes will be further refined to more closely match the barcode's outline in the input image. final JSONObjecttoJson(ToJsonConfiguration config)final BarcodeScannerConfigurationclone()final static BarcodeScannerConfigurationdefault()-
-
Constructor Detail
-
BarcodeScannerConfiguration
BarcodeScannerConfiguration(JSONObject json)
-
BarcodeScannerConfiguration
BarcodeScannerConfiguration(List<BarcodeFormatConfigurationBase> barcodeFormatConfigurations, List<BarcodeDocumentFormat> extractedDocumentFormats, Boolean onlyAcceptDocuments, Boolean returnBarcodeImage, BarcodeScannerEngineMode engineMode, Boolean optimizedForOverlays)
-
-
Method Detail
-
getBarcodeFormatConfigurations
final List<BarcodeFormatConfigurationBase> getBarcodeFormatConfigurations()
Options for barcode decoding.
-
setBarcodeFormatConfigurations
final Unit setBarcodeFormatConfigurations(List<BarcodeFormatConfigurationBase> barcodeFormatConfigurations)
Options for barcode decoding.
-
getExtractedDocumentFormats
final List<BarcodeDocumentFormat> getExtractedDocumentFormats()
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.
-
setExtractedDocumentFormats
final Unit setExtractedDocumentFormats(List<BarcodeDocumentFormat> extractedDocumentFormats)
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.
-
getOnlyAcceptDocuments
final Boolean getOnlyAcceptDocuments()
If true and extractedDocumentFormats is not empty, then barcodes that don't decode to one of the extracted document formats will be ignored.
Default is false
-
setOnlyAcceptDocuments
final Unit setOnlyAcceptDocuments(Boolean onlyAcceptDocuments)
If true and extractedDocumentFormats is not empty, then barcodes that don't decode to one of the extracted document formats will be ignored.
Default is false
-
getReturnBarcodeImage
final Boolean getReturnBarcodeImage()
If true, the barcode image will be returned in the BarcodeItem.
Default is false
-
setReturnBarcodeImage
final Unit setReturnBarcodeImage(Boolean returnBarcodeImage)
If true, the barcode image will be returned in the BarcodeItem.
Default is false
-
getEngineMode
final BarcodeScannerEngineMode getEngineMode()
The engine mode for barcode scanning.
Default is NEXT_GEN
-
setEngineMode
final Unit setEngineMode(BarcodeScannerEngineMode engineMode)
The engine mode for barcode scanning.
Default is NEXT_GEN
-
getOptimizedForOverlays
final Boolean getOptimizedForOverlays()
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.
Default is false
-
setOptimizedForOverlays
final Unit setOptimizedForOverlays(Boolean optimizedForOverlays)
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.
Default is false
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final BarcodeScannerConfiguration clone()
-
default
final static BarcodeScannerConfiguration default()
-
-
-
-