java.lang.Object
com.microblink.photopay.entities.Entity<T>
com.microblink.photopay.entities.recognizers.Recognizer<BarcodeRecognizer.Result>
com.microblink.photopay.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer
All Implemented Interfaces:
android.os.Parcelable, JsonizableEntity

public final class BarcodeRecognizer extends Recognizer<BarcodeRecognizer.Result>
Recognizer that can perform recognition of any supported barcode type.
  • Field Details

    • CREATOR

      public static final android.os.Parcelable.Creator<BarcodeRecognizer> CREATOR
  • Constructor Details

    • BarcodeRecognizer

      public BarcodeRecognizer()
  • Method Details

    • setScanCode128

      public void setScanCode128(boolean scanCode128)
      Should Code128 barcode be scanned. By default, this is set to 'false'
    • shouldScanCode128

      public boolean shouldScanCode128()
      Should Code128 barcode be scanned. By default, this is set to 'false'
    • setScanCode39

      public void setScanCode39(boolean scanCode39)
      Should Code39 barcode be scanned. By default, this is set to 'false'
    • shouldScanCode39

      public boolean shouldScanCode39()
      Should Code39 barcode be scanned. By default, this is set to 'false'
    • setSlowerThoroughScan

      public void setSlowerThoroughScan(boolean slowerThoroughScan)
      Enable slower, but more thorough scanning, thus giving higher possibility of successful scan. By default, this is set to 'true' NOTE: this option has no effect on PDF417 barcode scanning
    • isSlowerThoroughScan

      public boolean isSlowerThoroughScan()
      Enable slower, but more thorough scanning, thus giving higher possibility of successful scan. By default, this is set to 'true' NOTE: this option has no effect on PDF417 barcode scanning
    • setScanEan8

      public void setScanEan8(boolean scanEan8)
      Should EAN8 barcode be scanned. By default, this is set to 'false'
    • shouldScanEan8

      public boolean shouldScanEan8()
      Should EAN8 barcode be scanned. By default, this is set to 'false'
    • setScanEan13

      public void setScanEan13(boolean scanEan13)
      Should EAN13 barcode be scanned. By default, this is set to 'false'
    • shouldScanEan13

      public boolean shouldScanEan13()
      Should EAN13 barcode be scanned. By default, this is set to 'false'
    • setScanPdf417

      public void setScanPdf417(boolean scanPdf417)
      Should PDF417 2D barcode be scanned. By default, this is set to 'false'
    • shouldScanPdf417

      public boolean shouldScanPdf417()
      Should PDF417 2D barcode be scanned. By default, this is set to 'false'
    • setScanInverse

      public void setScanInverse(boolean scanInverse)
      Enables scanning of barcodes with inverse intensity values (e.g. white barcode on black background) By default, this is set to 'false'
    • isScanInverse

      public boolean isScanInverse()
      Enables scanning of barcodes with inverse intensity values (e.g. white barcode on black background) By default, this is set to 'false'
    • setScanUncertain

      public void setScanUncertain(boolean scanUncertain)
      Enable decoding of non-standard PDF417 barcodes, but without guarantee that all data will be read. This option should be enabled for PDF417 barcode that has missing rows (i.e. not whole barcode is printed) By default, this is set to 'true'
    • isScanUncertain

      public boolean isScanUncertain()
      Enable decoding of non-standard PDF417 barcodes, but without guarantee that all data will be read. This option should be enabled for PDF417 barcode that has missing rows (i.e. not whole barcode is printed) By default, this is set to 'true'
    • setScanUpce

      public void setScanUpce(boolean scanUpce)
      Should UPCE barcode be scanned. By default, this is set to 'false'
    • shouldScanUpce

      public boolean shouldScanUpce()
      Should UPCE barcode be scanned. By default, this is set to 'false'
    • setReadCode39AsExtendedData

      public void setReadCode39AsExtendedData(boolean readCode39AsExtendedData)
      Enable reading code39 barcode contents as extended data. For more information about code39 extended data (a.k.a. full ASCII mode), see https://en.wikipedia.org/wiki/Code_39#Full_ASCII_Code_39 By default, this is set to 'false'
    • shouldReadCode39AsExtendedData

      public boolean shouldReadCode39AsExtendedData()
      Enable reading code39 barcode contents as extended data. For more information about code39 extended data (a.k.a. full ASCII mode), see https://en.wikipedia.org/wiki/Code_39#Full_ASCII_Code_39 By default, this is set to 'false'
    • setNullQuietZoneAllowed

      public void setNullQuietZoneAllowed(boolean nullQuietZoneAllowed)
      Allow scanning PDF417 barcodes which don't have quiet zone surrounding it (e.g. text concatenated with barcode). This option can significantly increase recognition time. By default, this is set to 'false'
    • isNullQuietZoneAllowed

      public boolean isNullQuietZoneAllowed()
      Allow scanning PDF417 barcodes which don't have quiet zone surrounding it (e.g. text concatenated with barcode). This option can significantly increase recognition time. By default, this is set to 'false'
    • setScanItf

      public void setScanItf(boolean scanItf)
      Should ITF barcode be scanned. By default, this is set to 'false'
    • shouldScanItf

      public boolean shouldScanItf()
      Should ITF barcode be scanned. By default, this is set to 'false'
    • setScanQrCode

      public void setScanQrCode(boolean scanQrCode)
      Should QR code be scanned. By default, this is set to 'false'
    • shouldScanQrCode

      public boolean shouldScanQrCode()
      Should QR code be scanned. By default, this is set to 'false'
    • setScanUpca

      public void setScanUpca(boolean scanUpca)
      Should UPCA barcode be scanned. By default, this is set to 'false'
    • shouldScanUpca

      public boolean shouldScanUpca()
      Should UPCA barcode be scanned. By default, this is set to 'false'
    • setAutoScaleDetection

      public void setAutoScaleDetection(boolean autoScaleDetection)
      Allow enabling the autodetection of image scale when scanning barcodes. If set to true, prior reading barcode, image scale will be corrected. This enabled correct reading of barcodes on high resolution images but slows down the recognition process. By default, this is set to 'true' NOTE: This setting is applied only for Code39 and Code128 barcode scanning.
    • isAutoScaleDetection

      public boolean isAutoScaleDetection()
      Allow enabling the autodetection of image scale when scanning barcodes. If set to true, prior reading barcode, image scale will be corrected. This enabled correct reading of barcodes on high resolution images but slows down the recognition process. By default, this is set to 'true' NOTE: This setting is applied only for Code39 and Code128 barcode scanning.
    • terminateNative

      protected void terminateNative(long nativeContext)
      Specified by:
      terminateNative in class Entity<BarcodeRecognizer.Result>
    • serializeNativeSettings

      @Nullable protected byte[] serializeNativeSettings()
      Specified by:
      serializeNativeSettings in class Entity<BarcodeRecognizer.Result>
    • deserializeNativeSettings

      protected void deserializeNativeSettings(@NonNull byte[] serializedSettings)
      Specified by:
      deserializeNativeSettings in class Entity<BarcodeRecognizer.Result>
    • clone

      public BarcodeRecognizer clone()
      Description copied from class: Entity
      Create a copy of the entity. This is required if properties of the entity must be modified while background thread performs processing. In order to avoid race conditions, changing properties is not allowed while entity is used in background processing. However, you are able to make a copy of the entity, change properties of it and then update the RecognizerRunnerView or RecognizerRunner with the updated entity hierarchy.
      Specified by:
      clone in class Recognizer<BarcodeRecognizer.Result>
      Returns:
      a copy of the entity
    • consumeResultFrom

      public void consumeResultFrom(@NonNull Entity other)
      Description copied from class: Entity
      Consume result from other entity. The result from other will be put instead current result of this entity. This method is used inside BaseIntentTransferable.loadFromIntent(Intent) and similar methods to replace the result content of the saved entities with results that have arrived over Intent
      Specified by:
      consumeResultFrom in class Entity<BarcodeRecognizer.Result>
      Parameters:
      other - Entity from which result should be consumed.