Class BarcodeFormatCommonConfiguration

  • All Implemented Interfaces:
    android.os.Parcelable

    public final class BarcodeFormatCommonConfiguration
    extends BarcodeFormatConfigurationBase implements Parcelable
                        

    Convenience configuration for enabling the scanning of multiple barcode formats with a common configuration. Add to scanner configuration to enable and configure the scanning of multiple barcodes.

    The given configuration will be applied to all enabled barcode formats, if they support it. You can override the common configuration for individual barcode formats by additionally adding their specific configuration to the scanner's configuration.

    • Method Detail

      • getRegexFilter

         String getRegexFilter()

        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).

        Default is ""

      • setRegexFilter

         Unit setRegexFilter(String regexFilter)

        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).

        Default is ""

      • getMinimumSizeScore

         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

         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

      • getAddAdditionalQuietZone

         Boolean getAddAdditionalQuietZone()

        If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode.

        Default is false

      • setAddAdditionalQuietZone

         Unit setAddAdditionalQuietZone(Boolean addAdditionalQuietZone)

        If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode.

        Default is false

      • getMinimum1DQuietZoneSize

         final Integer getMinimum1DQuietZoneSize()

        Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey, and Code11.

        Default is 6

      • setMinimum1DQuietZoneSize

         final Unit setMinimum1DQuietZoneSize(Integer minimum1DQuietZoneSize)

        Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey, and Code11.

        Default is 6

      • setStripCheckDigits

         final Unit setStripCheckDigits(Boolean stripCheckDigits)

        If true, the check digits are stripped from the result.

        Default is false

      • getMinimumTextLength

         final Integer getMinimumTextLength()

        Minimum text length. Applied only to linear barcode formats that allow variable length.

        Default is 1

      • setMinimumTextLength

         final Unit setMinimumTextLength(Integer minimumTextLength)

        Minimum text length. Applied only to linear barcode formats that allow variable length.

        Default is 1

      • getMaximumTextLength

         final Integer getMaximumTextLength()

        Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length.

        Default is 0

      • setMaximumTextLength

         final Unit setMaximumTextLength(Integer maximumTextLength)

        Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length.

        Default is 0

      • getStrictMode

         final Boolean getStrictMode()

        If true, the barcode scanner will only return barcodes that pass the strict validation checks according to standards to avoid false positives.

        Default is true

      • setStrictMode

         final Unit setStrictMode(Boolean strictMode)

        If true, the barcode scanner will only return barcodes that pass the strict validation checks according to standards to avoid false positives.

        Default is true

      • getFormats

         final List<BarcodeFormat> getFormats()

        List of barcode formats to scan. By default, the most commonly used formats are enabled.