Class BarcodeScannerConfiguration
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class BarcodeScannerConfiguration implements Parcelable
Configuration of the scanning behavior.
-
-
Field Summary
Fields Modifier and Type Field Description private List<BarcodeDocumentFormat>
extractedDocumentFormats
private Boolean
onlyAcceptDocuments
private UpcEanExtensionBehavior
extensions
private String
barcodesRegexFilter
private Double
minimumSizeScore
private Integer
minimumTextLength
private Integer
maximumTextLength
private Integer
minimum1DBarcodesQuietZone
private Boolean
stripCheckDigits
private Boolean
useIATA2OF5Checksum
private Boolean
useCode11Checksum
private List<BarcodeFormat>
barcodeFormats
private MsiPlesseyChecksumAlgorithm
msiPlesseyChecksumAlgorithm
private AustraliaPostCustomerFormat
australiaPostCustomerFormat
private Boolean
lowPowerMode
private Gs1Handling
gs1Handling
private Boolean
returnBarcodeImage
-
Constructor Summary
Constructors Constructor Description BarcodeScannerConfiguration(Map<String, Object> source)
BarcodeScannerConfiguration(JSONObject json)
BarcodeScannerConfiguration(List<BarcodeDocumentFormat> extractedDocumentFormats, Boolean onlyAcceptDocuments, UpcEanExtensionBehavior extensions, String barcodesRegexFilter, Double minimumSizeScore, Integer minimumTextLength, Integer maximumTextLength, Integer minimum1DBarcodesQuietZone, Boolean stripCheckDigits, Boolean useIATA2OF5Checksum, Boolean useCode11Checksum, List<BarcodeFormat> barcodeFormats, MsiPlesseyChecksumAlgorithm msiPlesseyChecksumAlgorithm, AustraliaPostCustomerFormat australiaPostCustomerFormat, Boolean lowPowerMode, Gs1Handling gs1Handling, Boolean returnBarcodeImage)
-
Method Summary
Modifier and Type Method Description final List<BarcodeDocumentFormat>
getExtractedDocumentFormats()
List of document formats to be extracted. final Unit
setExtractedDocumentFormats(List<BarcodeDocumentFormat> extractedDocumentFormats)
List of document formats to be extracted. final Boolean
getOnlyAcceptDocuments()
If true
and extractedDocumentFormats is not empty, then barcodes that do not decode to one of the accepted document formats will be ignored.final Unit
setOnlyAcceptDocuments(Boolean onlyAcceptDocuments)
If true
and extractedDocumentFormats is not empty, then barcodes that do not decode to one of the accepted document formats will be ignored.final UpcEanExtensionBehavior
getExtensions()
Filter for extended EAN and UPC barcodes. final Unit
setExtensions(UpcEanExtensionBehavior extensions)
Filter for extended EAN and UPC barcodes. final String
getBarcodesRegexFilter()
Regular expression filter for barcode text. final Unit
setBarcodesRegexFilter(String barcodesRegexFilter)
Regular expression filter for barcode text. final Double
getMinimumSizeScore()
Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). final Unit
setMinimumSizeScore(Double minimumSizeScore)
Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). final Integer
getMinimumTextLength()
Optional minimum required text length of the detected barcode. final Unit
setMinimumTextLength(Integer minimumTextLength)
Optional minimum required text length of the detected barcode. final Integer
getMaximumTextLength()
Optional maximum text length of the detected barcode. final Unit
setMaximumTextLength(Integer maximumTextLength)
Optional maximum text length of the detected barcode. final Integer
getMinimum1DBarcodesQuietZone()
Optional minimum required quiet zone on the barcode. final Unit
setMinimum1DBarcodesQuietZone(Integer minimum1DBarcodesQuietZone)
Optional minimum required quiet zone on the barcode. final Boolean
getStripCheckDigits()
If true
, check digits for UPC, EAN and MSI Plessey codes are removed from the result.final Unit
setStripCheckDigits(Boolean stripCheckDigits)
If true
, check digits for UPC, EAN and MSI Plessey codes are removed from the result.final Boolean
getUseIATA2OF5Checksum()
If true
, the optional check digit for IATA_2_OF_5 codes is used in validation.final Unit
setUseIATA2OF5Checksum(Boolean useIATA2OF5Checksum)
If true
, the optional check digit for IATA_2_OF_5 codes is used in validation.final Boolean
getUseCode11Checksum()
If true
, the optional check digit for CODE_11 codes is used in validation.final Unit
setUseCode11Checksum(Boolean useCode11Checksum)
If true
, the optional check digit for CODE_11 codes is used in validation.final List<BarcodeFormat>
getBarcodeFormats()
List of accepted barcode symbologies. final Unit
setBarcodeFormats(List<BarcodeFormat> barcodeFormats)
List of accepted barcode symbologies. final MsiPlesseyChecksumAlgorithm
getMsiPlesseyChecksumAlgorithm()
Checksum algorithm used for MSI Plessey barcodes. final Unit
setMsiPlesseyChecksumAlgorithm(MsiPlesseyChecksumAlgorithm msiPlesseyChecksumAlgorithm)
Checksum algorithm used for MSI Plessey barcodes. final AustraliaPostCustomerFormat
getAustraliaPostCustomerFormat()
The customer format used in AUSTRALIA_POST codes. final Unit
setAustraliaPostCustomerFormat(AustraliaPostCustomerFormat australiaPostCustomerFormat)
The customer format used in AUSTRALIA_POST codes. final Boolean
getLowPowerMode()
If true
, enables a mode that slightly decreases scanning quality and energy consumption.final Unit
setLowPowerMode(Boolean lowPowerMode)
If true
, enables a mode that slightly decreases scanning quality and energy consumption.final Gs1Handling
getGs1Handling()
The expected way of handling GS1_COMPOSITE barcodes. final Unit
setGs1Handling(Gs1Handling gs1Handling)
The expected way of handling GS1_COMPOSITE barcodes. final Boolean
getReturnBarcodeImage()
If true
, the barcode image is returned in the result.final Unit
setReturnBarcodeImage(Boolean returnBarcodeImage)
If true
, the barcode image is returned in the result.final JSONObject
toJson(ToJsonConfiguration config)
final BarcodeScannerConfiguration
clone()
final static BarcodeScannerConfiguration
default()
-
-
-
Constructor Detail
-
BarcodeScannerConfiguration
BarcodeScannerConfiguration(JSONObject json)
-
BarcodeScannerConfiguration
BarcodeScannerConfiguration(List<BarcodeDocumentFormat> extractedDocumentFormats, Boolean onlyAcceptDocuments, UpcEanExtensionBehavior extensions, String barcodesRegexFilter, Double minimumSizeScore, Integer minimumTextLength, Integer maximumTextLength, Integer minimum1DBarcodesQuietZone, Boolean stripCheckDigits, Boolean useIATA2OF5Checksum, Boolean useCode11Checksum, List<BarcodeFormat> barcodeFormats, MsiPlesseyChecksumAlgorithm msiPlesseyChecksumAlgorithm, AustraliaPostCustomerFormat australiaPostCustomerFormat, Boolean lowPowerMode, Gs1Handling gs1Handling, Boolean returnBarcodeImage)
-
-
Method Detail
-
getExtractedDocumentFormats
final List<BarcodeDocumentFormat> getExtractedDocumentFormats()
List of document formats to be extracted.
Defaults to all document formats.
-
setExtractedDocumentFormats
final Unit setExtractedDocumentFormats(List<BarcodeDocumentFormat> extractedDocumentFormats)
List of document formats to be extracted.
Defaults to all document formats.
-
getOnlyAcceptDocuments
final Boolean getOnlyAcceptDocuments()
If
true
and extractedDocumentFormats is not empty, then barcodes that do not decode to one of the accepted document formats will be ignored.Default is false
-
setOnlyAcceptDocuments
final Unit setOnlyAcceptDocuments(Boolean onlyAcceptDocuments)
If
true
and extractedDocumentFormats is not empty, then barcodes that do not decode to one of the accepted document formats will be ignored.Default is false
-
getExtensions
final UpcEanExtensionBehavior getExtensions()
Filter for extended EAN and UPC barcodes.
Default is ALLOW_ANY
-
setExtensions
final Unit setExtensions(UpcEanExtensionBehavior extensions)
Filter for extended EAN and UPC barcodes.
Default is ALLOW_ANY
-
getBarcodesRegexFilter
final String getBarcodesRegexFilter()
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.Default is ""
-
setBarcodesRegexFilter
final Unit setBarcodesRegexFilter(String barcodesRegexFilter)
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.Default is ""
-
getMinimumSizeScore
final Double getMinimumSizeScore()
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.
Default is 0
-
setMinimumSizeScore
final Unit setMinimumSizeScore(Double minimumSizeScore)
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.
Default is 0
-
getMinimumTextLength
final Integer getMinimumTextLength()
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.
Default is 0
-
setMinimumTextLength
final Unit setMinimumTextLength(Integer minimumTextLength)
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.
Default is 0
-
getMaximumTextLength
final Integer getMaximumTextLength()
Optional maximum text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only.
Default is 0
-
setMaximumTextLength
final Unit setMaximumTextLength(Integer maximumTextLength)
Optional maximum text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only.
Default is 0
-
getMinimum1DBarcodesQuietZone
final Integer getMinimum1DBarcodesQuietZone()
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.
Default is 10
-
setMinimum1DBarcodesQuietZone
final Unit setMinimum1DBarcodesQuietZone(Integer minimum1DBarcodesQuietZone)
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.
Default is 10
-
getStripCheckDigits
final Boolean getStripCheckDigits()
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 isfalse
.Default is false
-
setStripCheckDigits
final Unit setStripCheckDigits(Boolean stripCheckDigits)
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 isfalse
.Default is false
-
getUseIATA2OF5Checksum
final Boolean getUseIATA2OF5Checksum()
If
true
, the optional check digit for IATA_2_OF_5 codes is used in validation. The default istrue
.Default is true
-
setUseIATA2OF5Checksum
final Unit setUseIATA2OF5Checksum(Boolean useIATA2OF5Checksum)
If
true
, the optional check digit for IATA_2_OF_5 codes is used in validation. The default istrue
.Default is true
-
getUseCode11Checksum
final Boolean getUseCode11Checksum()
If
true
, the optional check digit for CODE_11 codes is used in validation. The default istrue
.Default is true
-
setUseCode11Checksum
final Unit setUseCode11Checksum(Boolean useCode11Checksum)
If
true
, the optional check digit for CODE_11 codes is used in validation. The default istrue
.Default is true
-
getBarcodeFormats
final List<BarcodeFormat> getBarcodeFormats()
List of accepted barcode symbologies.
Defaults to common types.
-
setBarcodeFormats
final Unit setBarcodeFormats(List<BarcodeFormat> barcodeFormats)
List of accepted barcode symbologies.
Defaults to common types.
-
getMsiPlesseyChecksumAlgorithm
final MsiPlesseyChecksumAlgorithm getMsiPlesseyChecksumAlgorithm()
Checksum algorithm used for MSI Plessey barcodes. The default value is MOD_10.
Default is MOD_10
-
setMsiPlesseyChecksumAlgorithm
final Unit setMsiPlesseyChecksumAlgorithm(MsiPlesseyChecksumAlgorithm msiPlesseyChecksumAlgorithm)
Checksum algorithm used for MSI Plessey barcodes. The default value is MOD_10.
Default is MOD_10
-
getAustraliaPostCustomerFormat
final AustraliaPostCustomerFormat getAustraliaPostCustomerFormat()
The customer format used in AUSTRALIA_POST codes. The default value is ALPHA_NUMERIC.
Default is ALPHA_NUMERIC
-
setAustraliaPostCustomerFormat
final Unit setAustraliaPostCustomerFormat(AustraliaPostCustomerFormat australiaPostCustomerFormat)
The customer format used in AUSTRALIA_POST codes. The default value is ALPHA_NUMERIC.
Default is ALPHA_NUMERIC
-
getLowPowerMode
final Boolean getLowPowerMode()
If
true
, enables a mode that slightly decreases scanning quality and energy consumption. Increases scanning speed. Iffalse
, the mode is disabled. The default isfalse
. Android only.Default is false
-
setLowPowerMode
final Unit setLowPowerMode(Boolean lowPowerMode)
If
true
, enables a mode that slightly decreases scanning quality and energy consumption. Increases scanning speed. Iffalse
, the mode is disabled. The default isfalse
. Android only.Default is false
-
getGs1Handling
final Gs1Handling getGs1Handling()
The expected way of handling GS1_COMPOSITE barcodes.
Default is PARSE
-
setGs1Handling
final Unit setGs1Handling(Gs1Handling gs1Handling)
The expected way of handling GS1_COMPOSITE barcodes.
Default is PARSE
-
getReturnBarcodeImage
final Boolean getReturnBarcodeImage()
If
true
, the barcode image is returned in the result.Default is true
-
setReturnBarcodeImage
final Unit setReturnBarcodeImage(Boolean returnBarcodeImage)
If
true
, the barcode image is returned in the result.Default is true
-
toJson
final JSONObject toJson(ToJsonConfiguration config)
-
clone
final BarcodeScannerConfiguration clone()
-
default
final static BarcodeScannerConfiguration default()
-
-