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>extractedDocumentFormatsprivate BooleanonlyAcceptDocumentsprivate UpcEanExtensionBehaviorextensionsprivate StringbarcodesRegexFilterprivate DoubleminimumSizeScoreprivate IntegerminimumTextLengthprivate IntegermaximumTextLengthprivate Integerminimum1DBarcodesQuietZoneprivate BooleanstripCheckDigitsprivate BooleanuseIATA2OF5Checksumprivate BooleanuseCode11Checksumprivate List<BarcodeFormat>barcodeFormatsprivate MsiPlesseyChecksumAlgorithmmsiPlesseyChecksumAlgorithmprivate AustraliaPostCustomerFormataustraliaPostCustomerFormatprivate BooleanlowPowerModeprivate Gs1Handlinggs1Handlingprivate BooleanreturnBarcodeImage
-
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 UnitsetExtractedDocumentFormats(List<BarcodeDocumentFormat> extractedDocumentFormats)List of document formats to be extracted. final BooleangetOnlyAcceptDocuments()If trueand extractedDocumentFormats is not empty, then barcodes that do not decode to one of the accepted document formats will be ignored.final UnitsetOnlyAcceptDocuments(Boolean onlyAcceptDocuments)If trueand extractedDocumentFormats is not empty, then barcodes that do not decode to one of the accepted document formats will be ignored.final UpcEanExtensionBehaviorgetExtensions()Filter for extended EAN and UPC barcodes. final UnitsetExtensions(UpcEanExtensionBehavior extensions)Filter for extended EAN and UPC barcodes. final StringgetBarcodesRegexFilter()Regular expression filter for barcode text. final UnitsetBarcodesRegexFilter(String barcodesRegexFilter)Regular expression filter for barcode text. final DoublegetMinimumSizeScore()Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). final UnitsetMinimumSizeScore(Double minimumSizeScore)Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). final IntegergetMinimumTextLength()Optional minimum required text length of the detected barcode. final UnitsetMinimumTextLength(Integer minimumTextLength)Optional minimum required text length of the detected barcode. final IntegergetMaximumTextLength()Optional maximum text length of the detected barcode. final UnitsetMaximumTextLength(Integer maximumTextLength)Optional maximum text length of the detected barcode. final IntegergetMinimum1DBarcodesQuietZone()Optional minimum required quiet zone on the barcode. final UnitsetMinimum1DBarcodesQuietZone(Integer minimum1DBarcodesQuietZone)Optional minimum required quiet zone on the barcode. final BooleangetStripCheckDigits()If true, check digits for UPC, EAN and MSI Plessey codes are removed from the result.final UnitsetStripCheckDigits(Boolean stripCheckDigits)If true, check digits for UPC, EAN and MSI Plessey codes are removed from the result.final BooleangetUseIATA2OF5Checksum()If true, the optional check digit for IATA_2_OF_5 codes is used in validation.final UnitsetUseIATA2OF5Checksum(Boolean useIATA2OF5Checksum)If true, the optional check digit for IATA_2_OF_5 codes is used in validation.final BooleangetUseCode11Checksum()If true, the optional check digit for CODE_11 codes is used in validation.final UnitsetUseCode11Checksum(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 UnitsetBarcodeFormats(List<BarcodeFormat> barcodeFormats)List of accepted barcode symbologies. final MsiPlesseyChecksumAlgorithmgetMsiPlesseyChecksumAlgorithm()Checksum algorithm used for MSI Plessey barcodes. final UnitsetMsiPlesseyChecksumAlgorithm(MsiPlesseyChecksumAlgorithm msiPlesseyChecksumAlgorithm)Checksum algorithm used for MSI Plessey barcodes. final AustraliaPostCustomerFormatgetAustraliaPostCustomerFormat()The customer format used in AUSTRALIA_POST codes. final UnitsetAustraliaPostCustomerFormat(AustraliaPostCustomerFormat australiaPostCustomerFormat)The customer format used in AUSTRALIA_POST codes. final BooleangetLowPowerMode()If true, enables a mode that slightly decreases scanning quality and energy consumption.final UnitsetLowPowerMode(Boolean lowPowerMode)If true, enables a mode that slightly decreases scanning quality and energy consumption.final Gs1HandlinggetGs1Handling()The expected way of handling GS1_COMPOSITE barcodes. final UnitsetGs1Handling(Gs1Handling gs1Handling)The expected way of handling GS1_COMPOSITE barcodes. final BooleangetReturnBarcodeImage()If true, the barcode image is returned in the result.final UnitsetReturnBarcodeImage(Boolean returnBarcodeImage)If true, the barcode image is returned in the result.final JSONObjecttoJson(ToJsonConfiguration config)final BarcodeScannerConfigurationclone()final static BarcodeScannerConfigurationdefault()-
-
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
trueand 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
trueand 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
barcodesExtensionFilteroption.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
barcodesExtensionFilteroption.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()
-
-
-
-