Class BarcodeScanner

java.lang.Object
com.manateeworks.BarcodeScanner

public class BarcodeScanner extends Object
Represents a static BarcodeScanner class with native decoder. \ifnot MWBSDK Cognex Mobile Barcode SDK's easy API is preferred instead of this class and its associated legacy API. Unless explicitly directed to use this class, all new applications should now only be using ReaderDevice. Applications that use this API, may still use it, there is no need for migraton as it will be not removed without further notice. \endif
  • Field Details

    • MWB_RT_OK

      public static final int MWB_RT_OK
      Basic return values for API functions
      See Also:
    • MWB_RT_FAIL

      public static final int MWB_RT_FAIL
      See Also:
    • MWB_RT_NOT_SUPPORTED

      public static final int MWB_RT_NOT_SUPPORTED
      See Also:
    • MWB_RT_BAD_PARAM

      public static final int MWB_RT_BAD_PARAM
      See Also:
    • MWB_RTREG_OK

      public static final int MWB_RTREG_OK
      Basic return values for RegisterSDK function
      See Also:
    • MWB_RTREG_INVALID_KEY

      public static final int MWB_RTREG_INVALID_KEY
      See Also:
    • MWB_RTREG_INVALID_CHECKSUM

      public static final int MWB_RTREG_INVALID_CHECKSUM
      See Also:
    • MWB_RTREG_INVALID_APPLICATION

      public static final int MWB_RTREG_INVALID_APPLICATION
      See Also:
    • MWB_RTREG_INVALID_SDK_VERSION

      public static final int MWB_RTREG_INVALID_SDK_VERSION
      See Also:
    • MWB_RTREG_INVALID_KEY_VERSION

      public static final int MWB_RTREG_INVALID_KEY_VERSION
      See Also:
    • MWB_RTREG_INVALID_PLATFORM

      public static final int MWB_RTREG_INVALID_PLATFORM
      See Also:
    • MWB_RTREG_KEY_EXPIRED

      public static final int MWB_RTREG_KEY_EXPIRED
      See Also:
    • MWB_RTREG_REGISTERING_IN_PROGRESS

      public static final int MWB_RTREG_REGISTERING_IN_PROGRESS
      See Also:
    • MWB_RTREG_CUSTOM_SIZE_EXCEEDED

      public static final int MWB_RTREG_CUSTOM_SIZE_EXCEEDED
      See Also:
    • MWB_CFG_CODE39_REQUIRE_CHECKSUM

      public static final int MWB_CFG_CODE39_REQUIRE_CHECKSUM
      Code39 decoder flags value: require checksum check
      See Also:
    • MWB_CFG_CODE39_DONT_REQUIRE_STOP

      public static final int MWB_CFG_CODE39_DONT_REQUIRE_STOP
      Code39 decoder flags value: don't require stop symbol - can lead to false results
      See Also:
    • MWB_CFG_CODE39_EXTENDED_MODE

      public static final int MWB_CFG_CODE39_EXTENDED_MODE
      Code39 decoder flags value: decode full ASCII
      See Also:
    • MWB_CFG_CODE39_CODE32_ENABLED

      public static final int MWB_CFG_CODE39_CODE32_ENABLED
      Code39 decoder flags value: Try decoding result to CODE32. if failed, Code39 will return
      See Also:
    • MWB_CFG_CODE39_CODE32_PREFIX

      public static final int MWB_CFG_CODE39_CODE32_PREFIX
      Code39 decoder flags value: ADD 'A' prefix to Code32 result
      See Also:
    • MWB_CFG_CODE93_EXTENDED_MODE

      public static final int MWB_CFG_CODE93_EXTENDED_MODE
      Code93 decoder flags value: decode full ASCII
      See Also:
    • MWB_CFG_EANUPC_DISABLE_ADDON

      public static final int MWB_CFG_EANUPC_DISABLE_ADDON
      UPC/EAN decoder disable addons detection
      See Also:
    • MWB_CFG_EANUPC_DONT_EXPAND_UPCE

      public static final int MWB_CFG_EANUPC_DONT_EXPAND_UPCE
      UPC/EAN disable UPC-E expanding to UPC-A
      See Also:
    • MWB_CFG_CODE25_REQ_CHKSUM

      public static final int MWB_CFG_CODE25_REQ_CHKSUM
      Code25 decoder flags value: require checksum check MWB_CFG_CODE25_REQ_CHKSUM is deprecated and shouldn't be used in combination with other checksum flags
      See Also:
    • MWB_CFG_CODE25_REQ_CHKSUM_STANDARD

      public static final int MWB_CFG_CODE25_REQ_CHKSUM_STANDARD
      See Also:
    • MWB_CFG_CODE25_REQ_CHKSUM_INTERLEAVED

      public static final int MWB_CFG_CODE25_REQ_CHKSUM_INTERLEAVED
      See Also:
    • MWB_CFG_CODE25_REQ_CHKSUM_IATA

      public static final int MWB_CFG_CODE25_REQ_CHKSUM_IATA
      See Also:
    • MWB_CFG_CODE25_REQ_CHKSUM_MATRIX

      public static final int MWB_CFG_CODE25_REQ_CHKSUM_MATRIX
      See Also:
    • MWB_CFG_CODE25_REQ_CHKSUM_COOP

      public static final int MWB_CFG_CODE25_REQ_CHKSUM_COOP
      See Also:
    • MWB_CFG_CODE25_REQ_CHKSUM_INVERTED

      public static final int MWB_CFG_CODE25_REQ_CHKSUM_INVERTED
      See Also:
    • MWB_CFG_TELEPEN_FORCE_NUMERIC

      public static final int MWB_CFG_TELEPEN_FORCE_NUMERIC
      Telepen decoder flags
      See Also:
    • MWB_CFG_CODE11_REQ_SINGLE_CHKSUM

      public static final int MWB_CFG_CODE11_REQ_SINGLE_CHKSUM
      Code11 decoder flags value: require checksum check MWB_CFG_CODE11_REQ_SINGLE_CHKSUM is set by default
      See Also:
    • MWB_CFG_CODE11_REQ_DOUBLE_CHKSUM

      public static final int MWB_CFG_CODE11_REQ_DOUBLE_CHKSUM
      See Also:
    • MWB_CFG_MSI_REQ_10_CHKSUM

      public static final int MWB_CFG_MSI_REQ_10_CHKSUM
      MSI Plessey decoder flags value: require checksum check MWB_CFG_MSI_REQ_10_CHKSUM is set by default
      See Also:
    • MWB_CFG_MSI_REQ_1010_CHKSUM

      public static final int MWB_CFG_MSI_REQ_1010_CHKSUM
      See Also:
    • MWB_CFG_MSI_REQ_11_IBM_CHKSUM

      public static final int MWB_CFG_MSI_REQ_11_IBM_CHKSUM
      See Also:
    • MWB_CFG_MSI_REQ_11_NCR_CHKSUM

      public static final int MWB_CFG_MSI_REQ_11_NCR_CHKSUM
      See Also:
    • MWB_CFG_MSI_REQ_1110_IBM_CHKSUM

      public static final int MWB_CFG_MSI_REQ_1110_IBM_CHKSUM
      See Also:
    • MWB_CFG_MSI_REQ_1110_NCR_CHKSUM

      public static final int MWB_CFG_MSI_REQ_1110_NCR_CHKSUM
      See Also:
    • MWB_CFG_CODABAR_INCLUDE_STARTSTOP

      public static final int MWB_CFG_CODABAR_INCLUDE_STARTSTOP
      Codabar decoder flags value: include start/stop symbols in result
      See Also:
    • MWB_CFG_GLOBAL_HORIZONTAL_SHARPENING

      public static final int MWB_CFG_GLOBAL_HORIZONTAL_SHARPENING
      Global decoder flags value: apply sharpening on input image
      See Also:
    • MWB_CFG_GLOBAL_VERTICAL_SHARPENING

      public static final int MWB_CFG_GLOBAL_VERTICAL_SHARPENING
      See Also:
    • MWB_CFG_GLOBAL_SHARPENING

      public static final int MWB_CFG_GLOBAL_SHARPENING
      See Also:
    • MWB_CFG_GLOBAL_ROTATE90

      public static final int MWB_CFG_GLOBAL_ROTATE90
      Global decoder flags value: apply rotation on input image
      See Also:
    • MWB_CFG_GLOBAL_ROTATE180

      public static final int MWB_CFG_GLOBAL_ROTATE180
      See Also:
    • MWB_CFG_GLOBAL_CALCULATE_1D_LOCATION

      public static final int MWB_CFG_GLOBAL_CALCULATE_1D_LOCATION
      Global decoder flags value: calculate location for 1D barcodeTypes (Code128, Code93, Code39 supported)
      See Also:
    • MWB_CFG_GLOBAL_VERIFY_1D_LOCATION

      public static final int MWB_CFG_GLOBAL_VERIFY_1D_LOCATION
      Global decoder flags value: fail 1D decode if result is not confirmed by location expanding (Code128, Code93, Code39 supported)
      See Also:
    • MWB_CFG_GLOBAL_USE_CENTRIC_SCANNING

      public static final int MWB_CFG_GLOBAL_USE_CENTRIC_SCANNING
      Global decoder flags value: fail decode if result is not touching the center of viewfinder (2D + Code128, Code93, Code39 supported) 1D location flags will be enabled automatically with this one
      See Also:
    • MWB_CFG_GLOBAL_DISABLE_PREPROCESSING

      public static final int MWB_CFG_GLOBAL_DISABLE_PREPROCESSING
      Global decoder flags value: disable some image pre=processing, suitable for devices with weak CPU
      See Also:
    • MWB_CFG_GLOBAL_ENABLE_MULTI

      public static final int MWB_CFG_GLOBAL_ENABLE_MULTI
      Global decoder flags value: enable multi code scanning
      See Also:
    • MWB_CODE_MASK_NONE

      public static final int MWB_CODE_MASK_NONE
      Bit mask identifiers for supported decoder types
      See Also:
    • MWB_CODE_MASK_QR

      public static final int MWB_CODE_MASK_QR
      See Also:
    • MWB_CODE_MASK_DM

      public static final int MWB_CODE_MASK_DM
      See Also:
    • MWB_CODE_MASK_RSS

      public static final int MWB_CODE_MASK_RSS
      See Also:
    • MWB_CODE_MASK_39

      public static final int MWB_CODE_MASK_39
      See Also:
    • MWB_CODE_MASK_EANUPC

      public static final int MWB_CODE_MASK_EANUPC
      See Also:
    • MWB_CODE_MASK_128

      public static final int MWB_CODE_MASK_128
      See Also:
    • MWB_CODE_MASK_PDF

      public static final int MWB_CODE_MASK_PDF
      See Also:
    • MWB_CODE_MASK_AZTEC

      public static final int MWB_CODE_MASK_AZTEC
      See Also:
    • MWB_CODE_MASK_25

      public static final int MWB_CODE_MASK_25
      See Also:
    • MWB_CODE_MASK_93

      public static final int MWB_CODE_MASK_93
      See Also:
    • MWB_CODE_MASK_CODABAR

      public static final int MWB_CODE_MASK_CODABAR
      See Also:
    • MWB_CODE_MASK_DOTCODE

      public static final int MWB_CODE_MASK_DOTCODE
      See Also:
    • MWB_CODE_MASK_11

      public static final int MWB_CODE_MASK_11
      See Also:
    • MWB_CODE_MASK_MSI

      public static final int MWB_CODE_MASK_MSI
      See Also:
    • MWB_CODE_MASK_MAXICODE

      public static final int MWB_CODE_MASK_MAXICODE
      See Also:
    • MWB_CODE_MASK_POSTAL

      public static final int MWB_CODE_MASK_POSTAL
      See Also:
    • MWB_CODE_MASK_TELEPEN

      public static final int MWB_CODE_MASK_TELEPEN
      See Also:
    • MWB_CODE_MASK_ALL

      public static final int MWB_CODE_MASK_ALL
      See Also:
    • MWB_SUBC_MASK_RSS_14

      public static final int MWB_SUBC_MASK_RSS_14
      Bit mask identifiers for RSS decoder types
      See Also:
    • MWB_SUBC_MASK_RSS_LIM

      public static final int MWB_SUBC_MASK_RSS_LIM
      See Also:
    • MWB_SUBC_MASK_RSS_EXP

      public static final int MWB_SUBC_MASK_RSS_EXP
      See Also:
    • MWB_SUBC_MASK_QR_STANDARD

      public static final int MWB_SUBC_MASK_QR_STANDARD
      Bit mask identifiers for QR decoder types
      See Also:
    • MWB_SUBC_MASK_QR_MICRO

      public static final int MWB_SUBC_MASK_QR_MICRO
      See Also:
    • MWB_SUBC_MASK_PDF_STANDARD

      public static final int MWB_SUBC_MASK_PDF_STANDARD
      Bit mask identifiers for PDF decoder types
      See Also:
    • MWB_SUBC_MASK_PDF_MICRO

      public static final int MWB_SUBC_MASK_PDF_MICRO
      See Also:
    • MWB_SUBC_MASK_C25_INTERLEAVED

      public static final int MWB_SUBC_MASK_C25_INTERLEAVED
      Bit mask identifiers for Code 2 of 5 decoder types
      See Also:
    • MWB_SUBC_MASK_C25_STANDARD

      public static final int MWB_SUBC_MASK_C25_STANDARD
      See Also:
    • MWB_SUBC_MASK_C25_ITF14

      public static final int MWB_SUBC_MASK_C25_ITF14
      See Also:
    • MWB_SUBC_MASK_C25_IATA

      public static final int MWB_SUBC_MASK_C25_IATA
      See Also:
    • MWB_SUBC_MASK_C25_MATRIX

      public static final int MWB_SUBC_MASK_C25_MATRIX
      See Also:
    • MWB_SUBC_MASK_C25_COOP

      public static final int MWB_SUBC_MASK_C25_COOP
      See Also:
    • MWB_SUBC_MASK_C25_INVERTED

      public static final int MWB_SUBC_MASK_C25_INVERTED
      See Also:
    • MWB_SUBC_MASK_POSTAL_POSTNET

      public static final int MWB_SUBC_MASK_POSTAL_POSTNET
      Bit mask identifiers for POSTAL decoder types
      See Also:
    • MWB_SUBC_MASK_POSTAL_PLANET

      public static final int MWB_SUBC_MASK_POSTAL_PLANET
      See Also:
    • MWB_SUBC_MASK_POSTAL_IM

      public static final int MWB_SUBC_MASK_POSTAL_IM
      See Also:
    • MWB_SUBC_MASK_POSTAL_ROYAL

      public static final int MWB_SUBC_MASK_POSTAL_ROYAL
      See Also:
    • MWB_SUBC_MASK_POSTAL_AUSTRALIAN

      public static final int MWB_SUBC_MASK_POSTAL_AUSTRALIAN
      See Also:
    • MWB_SUBC_MASK_EANUPC_EAN_13

      public static final int MWB_SUBC_MASK_EANUPC_EAN_13
      Bit mask identifiers for UPC/EAN decoder types
      See Also:
    • MWB_SUBC_MASK_EANUPC_EAN_8

      public static final int MWB_SUBC_MASK_EANUPC_EAN_8
      See Also:
    • MWB_SUBC_MASK_EANUPC_UPC_A

      public static final int MWB_SUBC_MASK_EANUPC_UPC_A
      See Also:
    • MWB_SUBC_MASK_EANUPC_UPC_E

      public static final int MWB_SUBC_MASK_EANUPC_UPC_E
      See Also:
    • MWB_SUBC_MASK_EANUPC_UPC_E1

      public static final int MWB_SUBC_MASK_EANUPC_UPC_E1
      See Also:
    • MWB_SCANDIRECTION_HORIZONTAL

      public static final int MWB_SCANDIRECTION_HORIZONTAL
      Bit mask identifiers for 1D scanning direction
      See Also:
    • MWB_SCANDIRECTION_VERTICAL

      public static final int MWB_SCANDIRECTION_VERTICAL
      See Also:
    • MWB_SCANDIRECTION_OMNI

      public static final int MWB_SCANDIRECTION_OMNI
      See Also:
    • MWB_SCANDIRECTION_AUTODETECT

      public static final int MWB_SCANDIRECTION_AUTODETECT
      See Also:
    • FOUND_NONE

      public static final int FOUND_NONE
      Result values for all code types
      See Also:
    • FOUND_DM

      public static final int FOUND_DM
      See Also:
    • FOUND_39

      public static final int FOUND_39
      See Also:
    • FOUND_RSS_14

      public static final int FOUND_RSS_14
      See Also:
    • FOUND_RSS_14_STACK

      public static final int FOUND_RSS_14_STACK
      See Also:
    • FOUND_RSS_LIM

      public static final int FOUND_RSS_LIM
      See Also:
    • FOUND_RSS_EXP

      public static final int FOUND_RSS_EXP
      See Also:
    • FOUND_EAN_13

      public static final int FOUND_EAN_13
      See Also:
    • FOUND_EAN_8

      public static final int FOUND_EAN_8
      See Also:
    • FOUND_UPC_A

      public static final int FOUND_UPC_A
      See Also:
    • FOUND_UPC_E

      public static final int FOUND_UPC_E
      See Also:
    • FOUND_128

      public static final int FOUND_128
      See Also:
    • FOUND_PDF

      public static final int FOUND_PDF
      See Also:
    • FOUND_QR

      public static final int FOUND_QR
      See Also:
    • FOUND_AZTEC

      public static final int FOUND_AZTEC
      See Also:
    • FOUND_25_INTERLEAVED

      public static final int FOUND_25_INTERLEAVED
      See Also:
    • FOUND_25_STANDARD

      public static final int FOUND_25_STANDARD
      See Also:
    • FOUND_93

      public static final int FOUND_93
      See Also:
    • FOUND_CODABAR

      public static final int FOUND_CODABAR
      See Also:
    • FOUND_DOTCODE

      public static final int FOUND_DOTCODE
      See Also:
    • FOUND_128_GS1

      public static final int FOUND_128_GS1
      See Also:
    • FOUND_ITF14

      public static final int FOUND_ITF14
      See Also:
    • FOUND_11

      public static final int FOUND_11
      See Also:
    • FOUND_MSI

      public static final int FOUND_MSI
      See Also:
    • FOUND_25_IATA

      public static final int FOUND_25_IATA
      See Also:
    • FOUND_25_MATRIX

      public static final int FOUND_25_MATRIX
      See Also:
    • FOUND_25_COOP

      public static final int FOUND_25_COOP
      See Also:
    • FOUND_25_INVERTED

      public static final int FOUND_25_INVERTED
      See Also:
    • FOUND_QR_MICRO

      public static final int FOUND_QR_MICRO
      See Also:
    • FOUND_MAXICODE

      public static final int FOUND_MAXICODE
      See Also:
    • FOUND_POSTNET

      public static final int FOUND_POSTNET
      See Also:
    • FOUND_PLANET

      public static final int FOUND_PLANET
      See Also:
    • FOUND_IMB

      public static final int FOUND_IMB
      See Also:
    • FOUND_ROYALMAIL

      public static final int FOUND_ROYALMAIL
      See Also:
    • FOUND_MICRO_PDF

      public static final int FOUND_MICRO_PDF
      See Also:
    • FOUND_32

      public static final int FOUND_32
      See Also:
    • FOUND_AUSTRALIAN

      public static final int FOUND_AUSTRALIAN
      See Also:
    • FOUND_TELEPEN

      public static final int FOUND_TELEPEN
      See Also:
    • MWB_RESULT_TYPE_RAW

      public static final int MWB_RESULT_TYPE_RAW
      Identifiers for result types
      See Also:
    • MWB_RESULT_TYPE_MW

      public static final int MWB_RESULT_TYPE_MW
      See Also:
    • MWB_PAR_ID_ECI_MODE

      public static final int MWB_PAR_ID_ECI_MODE
      Barcode decoder param types
      See Also:
    • MWB_PAR_ID_RESULT_PREFIX

      public static final int MWB_PAR_ID_RESULT_PREFIX
      See Also:
    • MWB_PAR_ID_VERIFY_LOCATION

      public static final int MWB_PAR_ID_VERIFY_LOCATION
      See Also:
    • MWB_PAR_ID_SCAN_COLOR

      public static final int MWB_PAR_ID_SCAN_COLOR
      See Also:
    • MWB_PAR_ID_SAFE_ZONE_SCALE

      public static final int MWB_PAR_ID_SAFE_ZONE_SCALE
      See Also:
    • MWB_PAR_VALUE_ECI_DISABLED

      public static final int MWB_PAR_VALUE_ECI_DISABLED
      Barcode param values
      See Also:
    • MWB_PAR_VALUE_ECI_ENABLED

      public static final int MWB_PAR_VALUE_ECI_ENABLED
      See Also:
    • MWB_PAR_VALUE_RESULT_PREFIX_NEVER

      public static final int MWB_PAR_VALUE_RESULT_PREFIX_NEVER
      See Also:
    • MWB_PAR_VALUE_RESULT_PREFIX_ALWAYS

      public static final int MWB_PAR_VALUE_RESULT_PREFIX_ALWAYS
      See Also:
    • MWB_PAR_VALUE_RESULT_PREFIX_DEFAULT

      public static final int MWB_PAR_VALUE_RESULT_PREFIX_DEFAULT
      See Also:
    • MWB_PAR_VALUE_VERIFY_LOCATION_OFF

      public static final int MWB_PAR_VALUE_VERIFY_LOCATION_OFF
      See Also:
    • MWB_PAR_VALUE_VERIFY_LOCATION_ON

      public static final int MWB_PAR_VALUE_VERIFY_LOCATION_ON
      See Also:
    • MWB_RESULT_FT_BYTES

      public static final int MWB_RESULT_FT_BYTES
      Identifiers for result fields types
      See Also:
    • MWB_RESULT_FT_TEXT

      public static final int MWB_RESULT_FT_TEXT
      See Also:
    • MWB_RESULT_FT_TYPE

      public static final int MWB_RESULT_FT_TYPE
      See Also:
    • MWB_RESULT_FT_SUBTYPE

      public static final int MWB_RESULT_FT_SUBTYPE
      See Also:
    • MWB_RESULT_FT_SUCCESS

      public static final int MWB_RESULT_FT_SUCCESS
      See Also:
    • MWB_RESULT_FT_ISGS1

      public static final int MWB_RESULT_FT_ISGS1
      See Also:
    • MWB_RESULT_FT_LOCATION

      public static final int MWB_RESULT_FT_LOCATION
      See Also:
    • MWB_RESULT_FT_IMAGE_WIDTH

      public static final int MWB_RESULT_FT_IMAGE_WIDTH
      See Also:
    • MWB_RESULT_FT_IMAGE_HEIGHT

      public static final int MWB_RESULT_FT_IMAGE_HEIGHT
      See Also:
    • MWB_RESULT_FT_PARSER_BYTES

      public static final int MWB_RESULT_FT_PARSER_BYTES
      See Also:
    • MWB_RESULT_FT_MODULES_COUNT_X

      public static final int MWB_RESULT_FT_MODULES_COUNT_X
      See Also:
    • MWB_RESULT_FT_MODULES_COUNT_Y

      public static final int MWB_RESULT_FT_MODULES_COUNT_Y
      See Also:
    • MWB_RESULT_FT_MODULE_SIZE_X

      public static final int MWB_RESULT_FT_MODULE_SIZE_X
      See Also:
    • MWB_RESULT_FT_MODULE_SIZE_Y

      public static final int MWB_RESULT_FT_MODULE_SIZE_Y
      See Also:
    • MWB_RESULT_FT_SKEW

      public static final int MWB_RESULT_FT_SKEW
      See Also:
    • MWB_RESULT_FT_KANJI

      public static final int MWB_RESULT_FT_KANJI
      See Also:
    • MWB_RESULT_FT_BARCODE_WIDTH

      public static final int MWB_RESULT_FT_BARCODE_WIDTH
      See Also:
    • MWB_RESULT_FT_BARCODE_HEIGHT

      public static final int MWB_RESULT_FT_BARCODE_HEIGHT
      See Also:
    • MWB_RESULT_FT_TEXT_ENCODING

      public static final int MWB_RESULT_FT_TEXT_ENCODING
      See Also:
    • MWB_RESULT_FT_PDF_ROWS

      public static final int MWB_RESULT_FT_PDF_ROWS
      See Also:
    • MWB_RESULT_FT_PDF_COLUMNS

      public static final int MWB_RESULT_FT_PDF_COLUMNS
      See Also:
    • MWB_RESULT_FT_PDF_TRUNCATED

      public static final int MWB_RESULT_FT_PDF_TRUNCATED
      See Also:
    • MWB_RESULT_FT_PDF_ECLEVEL

      public static final int MWB_RESULT_FT_PDF_ECLEVEL
      See Also:
    • MWB_RESULT_FT_PDF_CODEWORDS

      public static final int MWB_RESULT_FT_PDF_CODEWORDS
      See Also:
  • Constructor Details

    • BarcodeScanner

      public BarcodeScanner()
  • Method Details

    • MWBgetLibVersion

      public static int MWBgetLibVersion()
      Returns version code of Barcode Scanner Library.
      Returns:
      32-bit version code in x.y.z format. Byte 3 (most significant byte): reserved (0) Byte 2: value x Byte 1: value y Byte 0 (least significant byte): value z
    • MWBgetLibVersionText

      public static String MWBgetLibVersionText()
    • MWBgetSupportedCodes

      public static int MWBgetSupportedCodes()
      Returns supported decoders in this library release.
      Returns:
      32-bit bit mask where each non-zero bit represents supported decoder according to MWB_CODE_MASK_... values defined in BarcodeScanner.java file.
    • MWBsetScanningRect

      public static int MWBsetScanningRect(int codeMask, float left, float top, float width, float height)
      Sets rectangular area for barcode scanning with selected single decoder type. After MWB_setScanningRect() call, all subseqent scans will be restricted to this region. If rectangle is not set, whole image is scanned. Also, if width or height is zero, whole image is scanned. Parameters are interpreted as percentage of image dimensions, i.e. ranges are 0 - 100 for all parameters.
      Parameters:
      codeMask - Single decoder type selector (MWB_CODE_MASK_...)
      left - X coordinate of left edge (percentage)
      top - Y coordinate of top edge (percentage)
      width - Rectangle witdh (x axis) (percentage)
      height - Rectangle height (y axis) (percentage)
      Returns:
      MWB_RT_OK Rectangle set successfully MWB_RT_BAD_PARAM Rectange percentages invalid (out of range)
    • MWBsetTargetRect

      public static int MWBsetTargetRect(float left, float top, float width, float height)
      Sets rectangular area for targeted barcode scanning. If rectangle size is greater than zero, decoder will discard all barcodes which location doesn't interleave with this rectangle If width or height is zero, targeted scanning is disabled Parameters are interpreted as percentage of image dimensions, i.e. ranges are 0 - 100 for all parameters.
      Parameters:
      left - X coordinate of left edge (percentage)
      top - Y coordinate of top edge (percentage)
      width - Rectangle witdh (x axis) (percentage)
      height - Rectangle height (y axis) (percentage)
      Returns:
      MWB_RT_OK Rectangle set successfully MWB_RT_BAD_PARAM Rectange percentages invalid (out of range)
    • MWBgetScanningRectArray

      public static float[] MWBgetScanningRectArray(int codeMask)
      Get rectangular area for barcode scanning with selected single or multiple decoder type(s). If codeMask is 0, union rectangle of all ACTIVE barcode types will be returned Output values are in percentages of screeen width and height (range 0 - 100)
      Parameters:
      codeMask - Single decoder type selector (MWB_CODE_MASK_...) or 0
      Returns:
      float array float array containing x, y, width, height (percentages)
    • MWBgetTargetRectArray

      public static float[] MWBgetTargetRectArray()
      Get rectangular area for targeted scanning Output values are in percentages of screeen width and height (range 0 - 100)
      Returns:
      float array float array containing x, y, width, height (percentages)
    • MWBregisterSDK

      public static int MWBregisterSDK(String key, android.app.Activity activity)
      Registers licensing information for all SDK functionality. It should be called once on app startup.
      Parameters:
      key - License key string
      activity - Activity/Context
      Returns:
      MWB_RT_OK Registration successful less than 0 Error code - see MWB_RTREG values
    • MWBregisterSDK

      public static int MWBregisterSDK(String key, android.content.Context context)
      Registers licensing information for all SDK functionality. It should be called once on app startup.
      Parameters:
      key - License key string
      context - Activity/Context
      Returns:
      MWB_RT_OK Registration successful less than 0 Error code - see MWB_RTREG values
    • MWBregisterSDKCustom

      public static int MWBregisterSDKCustom(String key, String customData, android.content.Context context)
      Same as RegisterSDK with addition of custom string to be sent along with tracking info.
      Parameters:
      key - License key string
      customData - Custom string
      context - Activity/Context
      Returns:
      MWB_RT_OK Registration successful less than 0 Error code - see MWB_RTREG values
    • MWBgetDeviceID

      public static String MWBgetDeviceID()
      Get device ID. It should be called after registering call, and works only on iOS and Android.
      Returns:
      non NULL ID of device NULL ID can't be retrieved
    • MWBgetLicenseString

      public static String MWBgetLicenseString()
      Get license string for retrieving remaining devices It should be called after registering call, and works only on iOS and Android
      Returns:
      non NULL encrypted licenseString NULL ID can't be retrieved
    • MWBsetActiveCodes

      public static int MWBsetActiveCodes(int codeMask)
      Sets active or inactive status of decoder types and updates decoder execution priority list. Upon library load, all decoder types are inactive by default. User must call this function at least once to choose active set of active decoders.
      Parameters:
      codeMask - ORed bit flags (MWB_CODE_MASK_...) of decoder types to be activated. Bit value '1' activates corresponding decoder, while bit value deactivates it.
      Returns:
      MWB_RT_OK All requested decoder types supported and activated. MWB_RT_NOT_SUPPORTED One or more requested decoder types is not supported in this library release. On this error, activation status of all supported types will not be changed.
    • MWBgetActiveCodes

      public static int MWBgetActiveCodes()
      Get active decoder types.
      Returns:
      32-bit bit mask of OR-ed active decoder types
    • MWBsetActiveSubcodes

      public static int MWBsetActiveSubcodes(int codeMask, int subMask)
      Set active subcodes for given code group flag. Subcodes under some decoder type are all activated by default.
      Parameters:
      codeMask - Single decoder type/group (MWB_CODE_MASK_...)
      subMask - ORed bit flags of requested decoder subtypes (MWB_SUBC_MASK_)
      Returns:
      MWB_RT_OK Activation successful MWB_RT_BAD_PARAM No decoder group selected MWB_RT_NOT_SUPPORTED Decoder group or subtype not supported
    • MWBgetActiveSubcodes

      public static int MWBgetActiveSubcodes(int codeMask)
      Get active subcodes for given code group flag.
      Parameters:
      codeMask - Single decoder type/group (MWB_CODE_MASK_...)
      Returns:
      greater than or equal to 0 Active subtypes for given code mask MWB_RT_BAD_PARAM No decoder group selected MWB_RT_NOT_SUPPORTED Decoder group or subtype not supported
    • MWBenableCode

      public static int MWBenableCode(int codeMask)
      Enable decoder type. Upon library load, all decoder types are inactive by default. User must call this function at least once to choose active decoder.
      Parameters:
      codeMask - Bit flags (MWB_CODE_MASK_...) of decoder type to be activated.
      Returns:
      MWB_RT_OK Requested decoder type supported and activated. MWB_RT_NOT_SUPPORTED Requested decoder type is not supported in this library release
    • MWBdisableCode

      public static int MWBdisableCode(int codeMask)
      Disable decoder type Remove barcode type from set of enabled types
      Parameters:
      codeMask - Bit flags (MWB_CODE_MASK_...) of decoder type to be deactivated.
      Returns:
      MWB_RT_OK Requested decoder type supported and deactivated. MWB_RT_NOT_SUPPORTED Requested decoder type is not supported in this library release
    • MWBenableSubcode

      public static int MWBenableSubcode(int codeMask, int subMask)
      Enable subcode for given code group flag. Subcodes under some decoder type are all activated by default.
      Parameters:
      codeMask - Single decoder type/group (MWB_CODE_MASK_...)
      subMask - Flag of requested decoder subtype (MWB_SUBC_MASK_)
      Returns:
      MWB_RT_OK Activation successful MWB_RT_BAD_PARAM No decoder group selected MWB_RT_NOT_SUPPORTED Decoder group or subtype not supported
    • MWBdisableSubcode

      public static int MWBdisableSubcode(int codeMask, int subMask)
      Disable subcode for given code group flag.
      Parameters:
      codeMask - Single decoder type/group (MWB_CODE_MASK_...)
      subMask - Flag of requested decoder subtype (MWB_SUBC_MASK_)
      Returns:
      MWB_RT_OK Deactivation successful MWB_RT_BAD_PARAM No decoder group selected MWB_RT_NOT_SUPPORTED Decoder group or subtype not supported
    • MWBcleanupLib

      public static int MWBcleanupLib()
      Free memory resources allocated by library. Should be invoked when library is not needed anymore, which is typically at application closing time. This cleanup is not necessary on most platforms, as memory resources are deallocated automatically by operating system.
      Returns:
      MWB_RT_OK Success
    • MWBgetLastType

      public static int MWBgetLastType()
      Retrieves actual detected code type after successful MWB_scanGrayscaleImage call. If last call was not successful, it will return FOUND_NONE.
      Returns:
      res_types Last decoded type MWB_RT_FAIL Library error
    • MWBisLastGS1

      public static int MWBisLastGS1()
      Retrieves is result of GS1 type.
      Returns:
      1 true 0 false MWB_RT_FAIL Library error
    • MWBscanGrayscaleImage

      public static byte[] MWBscanGrayscaleImage(byte[] gray, int width, int height)
      Main scan function. Invokes all activated decoders by priority. For successful scan, allocates byte array and passes it to user.
      Parameters:
      gray - Byte array representing grayscale value of image pixels. Array should be stored in row after row fashion, starting with top row.
      width - X axis size (width) of image.
      height - Y axis size (length) of image.
      Returns:
      byte array of length greater than 0 On successful decode, library allocates new byte array where it stores the decoded result. null Null pointer for byte[] gray or out of range parameters, or unsupported decoder found in execution list.
    • MWBscanByteBuffer

      public static byte[] MWBscanByteBuffer(ByteBuffer gray, int width, int height)
    • MWBsetFlags

      public static int MWBsetFlags(int codeMask, int flags)
      Configure options for single barcode type. MWB_setFlags configures options (if any) for decoder type specified in a codeMask. Options are given in a flags as bitwise OR of option bits. Available options depend on selected decoder type.
      Parameters:
      codeMask - Single decoder type (MWB_CODE_MASK_...)
      flags - ORed bit mask of selected decoder type options (MWB_FLAG_...) RSS decoder - no configuration options Code39 decoder - MWB_CFG_CODE39_REQ_CHKSUM - Checksum check mandatory
      Returns:
      MWB_RT_OK Success MWB_RT_FAIL No code found in image MWB_RT_BAD_PARAM Flag values out of range MWB_RT_NOT_SUPPORTED Flag values not supported for selected decoder
    • MWBgetFlags

      public static int MWBgetFlags(int codeMask)
      Get active flags for single barcode type.
      Parameters:
      codeMask - Single decoder type (MWB_CODE_MASK_...) or 0 for global flags
      Returns:
      32-bit mask of OR-ed active flags
    • MWBenableFlag

      public static int MWBenableFlag(int codeMask, int flag)
      Enable option for single barcode type (or global one). MWB_enableFlag configures option (if any) for decoder type specified in a codeMask. Available options depend on selected decoder type.
      Parameters:
      codeMask - Single decoder type (MWB_CODE_MASK_...)
      flag - Selected decoder type option (MWB_FLAG_...) RSS decoder - no configuration options Code39 decoder - MWB_CFG_CODE39_REQ_CHKSUM - Checksum check mandatory
      Returns:
      MWB_RT_OK Success MWB_RT_BAD_PARAM Flag value out of range MWB_RT_NOT_SUPPORTED Flag value not supported for selected decoder
    • MWBdisableFlag

      public static int MWBdisableFlag(int codeMask, int flag)
      Disable option for single barcode type (or global one). MWB_disableFlag disable option (if any) for decoder type specified in a codeMask. Available options depend on selected decoder type.
      Parameters:
      codeMask - Single decoder type (MWB_CODE_MASK_...)
      flag - Selected decoder type option (MWB_FLAG_...) RSS decoder - no configuration options Code39 decoder - MWB_CFG_CODE39_REQ_CHKSUM - Checksum check mandatory
      Returns:
      MWB_RT_OK Success MWB_RT_BAD_PARAM Flag value out of range MWB_RT_NOT_SUPPORTED Flag value not supported for selected decoder
    • MWBsetParam

      public static int MWBsetParam(int codeMask, int paramId, int paramValue)
      Set custom decoder param. MWB_setParam set custom decoder param id/value pair for decoder type specified in a codeMask.
      Parameters:
      codeMask - Single decoder type (MWB_CODE_MASK_...)
      paramId - ID of param
      paramValue - Integer value of param
      Returns:
      MWB_RT_OK Success MWB_RT_BAD_PARAM Invalid parameter specified MWB_RT_NOT_SUPPORTED Function not supported for specified codeMask
    • MWBgetParam

      public static int MWBgetParam(int codeMask, int paramId)
      Get specified decoder param. MWB_setParam gets specified decoder param id/value pair for decoder type specified in a codeMask.
      Parameters:
      codeMask - Single decoder type (MWB_CODE_MASK_...)
      paramId - ID of param
      Returns:
      greater than or equal to 0 Param value MWB_RT_BAD_PARAM Invalid parameter specified MWB_RT_NOT_SUPPORTED Function not supported for specified codeMask
    • MWBsetLevel

      public static int MWBsetLevel(int level)
      Configure global library effort level Barcode detector relies on image processing and geometry interpolation for extracting optimal data for decoding. Higher effort level involves more processing and intermediate parameter values, thus increasing probability of successful detection with low quality images, but also consuming more CPU time. Although level is global on library level, each decoder type has its own parameter set for each level.
      Parameters:
      level - Effort level - available values are 1, 2, 3, 4 and 5.
      Returns:
      MWB_RT_OK Success MWB_RT_BAD_PARAM Level out of range for selected decoder
    • MWBsetDirection

      public static int MWBsetDirection(int direction)
      Configure scanning direction for 1D barcodes. This function enables some control over scanning lines choice for 1D barcodes. By ORing available bit-masks user can add one or more direction options to scanning lines set. Density of lines and angle step for omni scan can be controlled with MWB_setLevel API function. Available options are: - MWB_SCANDIRECTION_HORIZONTAL - horizontal lines - MWB_SCANDIRECTION_VERTICAL - vertical lines - MWB_SCANDIRECTION_OMNI - omnidirectional lines - MWB_SCANDIRECTION_AUTODETECT - enables BarcodeScanner's autodetection of barcode direction
      Parameters:
      direction - ORed bit mask of direction modes given with MWB_SCANDIRECTION_... bit-masks
      Returns:
      MWB_RT_OK Success MWB_RT_BAD_PARAM Direction out of range
    • MWBgetDirection

      public static int MWBgetDirection()
      Get active scanning direction
      Returns:
      ORed bit flags of active scanning directions given with MWB_SCANDIRECTION_... bit-masks
    • MWBvalidateVIN

      public static int MWBvalidateVIN(byte[] vin)
      Checks if the input is a valid Vehicle Identification Number
      Parameters:
      vin - byte array string
      Returns:
      int result
    • MWBgetBarcodeLocation

      public static float[] MWBgetBarcodeLocation()
      Barcode location points. Returns quad points of detected barcode. Currently Works for PDF 417, QR, Datamatrix, Aztec and Dotcode
      Returns:
      float array Barcode location points returned with coordinates in order - X1, Y1, X2, Y2, X3, Y3, X4, Y4
    • MWBsetResultType

      public static int MWBsetResultType(int resultType)
      Set result type from MWB_scanGrayscaleImage Users now can choose between getting raw result bytes as a result of image scan, or byte representation of complex result structure containing all information about the scanned barcode.
      Parameters:
      resultType - Type of result returned: MWB_RESULT_TYPE_RAW - return raw result bytes MWB_RESULT_TYPE_MW - return bytes of MWResult structure - should be converted to MWResult object.
      Returns:
      MWB_RT_OK Result type set successfully MWB_RT_FAIL Invalid result type specified
    • MWBgetResultType

      public static int MWBgetResultType()
      Get currently active result type.
      Returns:
      resultType Type of result returned: MWB_RESULT_TYPE_RAW - return raw result bytes MWB_RESULT_TYPE_MW - return bytes of MWResult structure - should be converted to MWResult object.
    • MWBsetMinLength

      public static int MWBsetMinLength(int codeMask, int minLength)
      Set minimum result length for single barcode type. MWB_setMinLength set minimum acceptable result length for decoder type specified in a codeMask.
      Parameters:
      codeMask - Single decoder type (MWB_CODE_MASK_...)
      minLength - Minimum length of result Function is applicable to 1D barcode types with low or non existent error protection like Code39, Code25, Code 11, Codabar to prevent false results from short bars fragments
      Returns:
      MWB_RT_OK Success MWB_RT_BAD_PARAM Invalid parameter specified MWB_RT_NOT_SUPPORTED Function not supported for specified codeMask
    • MWBsetDuplicatesTimeout

      public static int MWBsetDuplicatesTimeout(int timeout)
      Set time in seconds in which decoder will ignore same barcode detected.
      Parameters:
      timeout - seconds to ignore same barcode
      Returns:
      MWB_RT_OK Success
    • MWBsetDuplicate

      public static void MWBsetDuplicate(byte[] barcode, int length)
      Set the decoded barcode result to be checked as duplicate.
      Parameters:
      barcode - decoded barcode result
      length - length of the barcode byte array
    • MWBcropPreviewFrame

      public static int[] MWBcropPreviewFrame(byte[] previewBuffer, int width, int height, int newSize)
      For use with StingRay.
      Parameters:
      previewBuffer - preview frame
      width - frame width
      height - frame height
      newSize - new size for both width and height
      Returns:
      frame cropped frame bytes (int array)
    • MWBsetScanningRect

      public static int MWBsetScanningRect(int codeMask, android.graphics.Rect rect)
      Sets rectangular area for barcode scanning with selected single decoder type. After MWB_setScanningRect() call, all subsequent scans will be restricted to this region. If rectangle is not set, whole image is scanned. Also, if width or height is zero, whole image is scanned. Parameters are interpreted as percentage of image dimensions, i.e. ranges are 0 - 100 for all parameters.
      Parameters:
      codeMask - Single decoder type selector (MWB_CODE_MASK_...)
      rect - Rectangle containing x, y, width, height (percentages)
      Returns:
      MWB_RT_OK Rectangle set successfully MWB_RT_BAD_PARAM Rectangle percentages invalid (out of range)
    • MWBsetTargetRect

      public static int MWBsetTargetRect(android.graphics.Rect rect)
    • MWBgetScanningRect

      public static android.graphics.RectF MWBgetScanningRect(int codeMask)
      Get rectangular area for barcode scanning with selected single or multiple decoder type(s). If codeMask is 0, union rectangle of all ACTIVE barcode types will be returned Output values are in percentages of screen width and height (range 0 - 100)
      Parameters:
      codeMask - Single decoder type selector (MWB_CODE_MASK_...) or 0
      Returns:
      RectF Rectangle containing x, y, width, height (percentages)
    • MWBgetTargetRect

      public static android.graphics.RectF MWBgetTargetRect()
      Get rectangular area for targeted scanning Output values are in percentages of screeen width and height (range 0 - 100)
      Returns:
      RectF Rectangle containing x, y, width, height (percentages)