com.pax.dal

Interface IScanCodec



  • public interface IScanCodec
    必须要添加权限:android.permission.READ_PHONE_STATE,android.permission.INTERNET和android.permission.ACCESS_WIFI_STATE
    Permissions must be added:android.permission.READ_PHONE_STATE,android.permission.INTERNET and android.permission.ACCESS_WIFI_STATE
    Since:
    V2.02.00
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      DecodeResult decode(byte[] data)
      扫描解码
      scanner decode
      DecodeResultRaw decodeRaw(byte[] data)
      扫描解码
      scanner decode
      DecodeResultRaw decodeRaw(byte[] data, long timeout)
      扫描解码
      scanner decode
      void disableFormat(int format)
      禁止扫描类型
      disable scanner format
      void enableFormat(int format)
      使能扫描类型
      enable scanner format
      void init(android.content.Context context, int width, int height)
      初始化(目前只支持1280 * 720, 640 * 480, 480 * 640)
      init(only support 1280 * 720, 640 * 480, 480 * 640)
      void release()
      释放资源
      release
    • Method Detail

      • disableFormat

        void disableFormat(int format)
        禁止扫描类型
        disable scanner format
        Parameters:
        format -
        条码类型
        • 1: CODEC_UPC
        • 2: CODEC_C39
        • 3: CODEC_C128
        • 4: CODEC_I25
        • 5: CODEC_C93
        • 6: CODEC_GS1_DATABAR
        • 7: CODEC_MSI
        • 8: CODEC_CODEBLOCK_F
        • 9: CODEC_PDF417
        • 10: CODEC_MICROPDF
        • 11: CODEC_MAXICODE
        • 12: CODEC_QRCODE
        • 13: CODEC_DATAMATRIX
        • 14: CODEC_AZTEC
        • 15: CODEC_HAXIN
        • 16: CODEC_MATRIX
        • 17: CODEC_TRIOPTIC
        • 18: CODEC_STRAIGHT25
        • 19: CODEC_TELEPEN
        • 20: CODEC_C11
        • 21: CODEC_NEC25
        • 22: CODEC_CODABAR
        • 23: CODEC_HK25
        • 24: CODEC_POSTAL
        scan format
        • 1: CODEC_UPC
        • 2: CODEC_C39
        • 3: CODEC_C128
        • 4: CODEC_I25
        • 5: CODEC_C93
        • 6: CODEC_GS1_DATABAR
        • 7: CODEC_MSI
        • 8: CODEC_CODEBLOCK_F
        • 9: CODEC_PDF417
        • 10: CODEC_MICROPDF
        • 11: CODEC_MAXICODE
        • 12: CODEC_QRCODE
        • 13: CODEC_DATAMATRIX
        • 14: CODEC_AZTEC
        • 15: CODEC_HAXIN
        • 16: CODEC_MATRIX
        • 17: CODEC_TRIOPTIC
        • 18: CODEC_STRAIGHT25
        • 19: CODEC_TELEPEN
        • 20: CODEC_C11
        • 21: CODEC_NEC25
        • 22: CODEC_CODABAR
        • 23: CODEC_HK25
        • 24: CODEC_POSTAL
      • enableFormat

        void enableFormat(int format)
        使能扫描类型
        enable scanner format
        Parameters:
        format -
        条码类型
        • 1: CODEC_UPC
        • 2: CODEC_C39
        • 3: CODEC_C128
        • 4: CODEC_I25
        • 5: CODEC_C93
        • 6: CODEC_GS1_DATABAR
        • 7: CODEC_MSI
        • 8: CODEC_CODEBLOCK_F
        • 9: CODEC_PDF417
        • 10: CODEC_MICROPDF
        • 11: CODEC_MAXICODE
        • 12: CODEC_QRCODE
        • 13: CODEC_DATAMATRIX
        • 14: CODEC_AZTEC
        • 15: CODEC_HAXIN
        • 16: CODEC_MATRIX
        • 17: CODEC_TRIOPTIC
        • 18: CODEC_STRAIGHT25
        • 19: CODEC_TELEPEN
        • 20: CODEC_C11
        • 21: CODEC_NEC25
        • 22: CODEC_CODABAR
        • 23: CODEC_HK25
        • 24: CODEC_POSTAL
        scan format
        • 1: CODEC_UPC
        • 2: CODEC_C39
        • 3: CODEC_C128
        • 4: CODEC_I25
        • 5: CODEC_C93
        • 6: CODEC_GS1_DATABAR
        • 7: CODEC_MSI
        • 8: CODEC_CODEBLOCK_F
        • 9: CODEC_PDF417
        • 10: CODEC_MICROPDF
        • 11: CODEC_MAXICODE
        • 12: CODEC_QRCODE
        • 13: CODEC_DATAMATRIX
        • 14: CODEC_AZTEC
        • 15: CODEC_HAXIN
        • 16: CODEC_MATRIX
        • 17: CODEC_TRIOPTIC
        • 18: CODEC_STRAIGHT25
        • 19: CODEC_TELEPEN
        • 20: CODEC_C11
        • 21: CODEC_NEC25
        • 22: CODEC_CODABAR
        • 23: CODEC_HK25
        • 24: CODEC_POSTAL
      • init

        void init(android.content.Context context,
                  int width,
                  int height)
        初始化(目前只支持1280 * 720, 640 * 480, 480 * 640)
        init(only support 1280 * 720, 640 * 480, 480 * 640)
        Parameters:
        context -
        上下文
        contex
        width -
        图像宽度
        width
        height -
        图像高度
        height
      • decode

        DecodeResult decode(byte[] data)
        扫描解码
        scanner decode
        Parameters:
        data -
        需要解码的原始数据
        original data that needs to be decoded
        Returns:
        解码结果DecodeResult,返回null代表不支持
        Decoding results DecodeResult, return null mean not support.
      • decodeRaw

        DecodeResultRaw decodeRaw(byte[] data)
        扫描解码
        scanner decode
        Parameters:
        data -
        需要解码的原始数据
        original data that needs to be decoded
        Returns:
        解码后的原始结果DecodeResultRaw,返回null代表不支持
        raw decoding results DecodeResultRaw, return null mean not support.
      • decodeRaw

        DecodeResultRaw decodeRaw(byte[] data,
                                  long timeout)
        扫描解码
        scanner decode
        Parameters:
        data -
        需要解码的原始数据
        original data that needs to be decoded
        timeout -
        超时时间 。大于等于500。单位:毫秒。
        Timeout. 500 or more. Unit: Millisecond.
        Returns:
        解码后的原始结果DecodeResultRaw,返回null代表不支持
        raw decoding results DecodeResultRaw, return null mean not support.
      • release

        void release()
        释放资源
        release