com.rscja.deviceapi.interfaces

## Interface IBarcodeUtility

- All Known Implementing Classes:
    BarcodeUtility

      public interface IBarcodeUtility

  条码操作类 barcode operate class 注意： Attention: 1、使用前请确认您的机器已安装键盘助手v1.9.0 之后的版本。 1. Confirm keyboardeumulator v1.9.0 has been installed before using.
  Author:
    zhoupin

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(Context context, BarcodeUtility.ModuleType modul)` 关闭指定功能 Switch off designated function
    `void` | `closeKeyboardHelper(Context context)` 关闭键盘助手功能总开关 Switch off main function switch of keyboardemulator
    `void` | `enableContinuousScan(Context context, boolean isContinuous)` 启用连续扫描 Enable continuous scan
    `void` | `enableEnter(Context context, boolean isEnter)` 是否启用回车 Whether enable Enter function
    `void` | `enablePlayFailureSound(Context context, boolean isFailureSound)` 扫描失败是否播放提示音 whether playing notification when scanning failure.
    `void` | `enablePlaySuccessSound(Context context, boolean isSuccessSound)` 是否播放成功的提示音 whether playing notification when scanning success.
    `void` | `enableTAB(Context context, boolean isTab)` 是否启用TAB Whether enable TAB function
    `void` | `enableVibrate(Context context, boolean isVibrate)` 扫描成功是否震动提示 whether vibrating when scanning success
    `void` | `filterCharacter(Context context, java.lang.String chars)` 过滤字符串 Filter charactor string
    `void` | `interceptTrimLeft(Context context, int num)` 截取左边字符串数量 Capture left side charactor string amount
    `void` | `interceptTrimRight(Context context, int num)` 截取右边字符串数量 Capture right side charactor string amount
    `void` | `open(Context context, BarcodeUtility.ModuleType modul)` 打开指定功能 Switch on designated function
    `void` | `openKeyboardHelper(Context context)` 打开键盘助手功能总开关 Switch on main function switch of keyboardemulator
    `void` | `setBarcodeEncodingFormat(Context context, int format)` 设置条码编码格式 Setup barcode coding format
    `void` | `setContinuousScanIntervalTime(Context context, int intervalTime)` 设置连续扫描间隔时间 Setup continuous scanning duration
    `void` | `setContinuousScanTimeOut(Context context, int timeOut)` 设置连续扫描超时时间 Setup continuous scanning overtime duration
    `void` | `setOutputMode(Context context, int mode)` 设置输出模式 Setup ouput mode
    `void` | `setParam_zebra(Context context, int paramId, int paramValue)` 设置斑马扫描头参数,扫描头上电之后设置一次即可,扫描头断电之后失效。(备注：键盘助手v2.2.0.3 之后的版本才支持)
    `void` | `setPrefix(Context context, java.lang.String prefix)` 设置前缀 Setup prefix
    `void` | `setReleaseScan(Context context, boolean enable)` 松开扫描按键是否停止扫描 loose scanning button to stop scanning or not
    `void` | `setScanFailureBroadcast(Context context, boolean enable)` 扫描失败是否发送广播 Send broadcast when scanning failure.
    `void` | `setScanOutTime(Context context, int time)` 设置超时时间 Setup overtime duration
    `void` | `setScanResultBroadcast(Context context, java.lang.String broadcastAction, java.lang.String extraName)` 设置接收扫描数据的广播 Setup broad cast of received scanning data
    `void` | `setSuffix(Context context, java.lang.String suffix)` 设置后缀 Setup suffix
    `void` | `startScan(Context context, BarcodeUtility.ModuleType modul)` 开始扫描 Start scanning
    `void` | `stopScan(Context context, BarcodeUtility.ModuleType modul)` 停止扫描 Stop scanning

- - ### Method Detail

    - #### open

          void open(Context context,
                    BarcodeUtility.ModuleType modul)

      打开指定功能 Switch on designated function
      Parameters:
        `context` -
        `modul` - 功能模块

    - #### close

          void close(Context context,
                     BarcodeUtility.ModuleType modul)

      关闭指定功能 Switch off designated function
      Parameters:
        `context` -
        `modul` - 功能模块

    - #### startScan

          void startScan(Context context,
                         BarcodeUtility.ModuleType modul)

      开始扫描 Start scanning
      Parameters:
        `modul` - 功能模块

    - #### stopScan

          void stopScan(Context context,
                        BarcodeUtility.ModuleType modul)

      停止扫描 Stop scanning
      Parameters:
        `context` -
        `modul` - 功能模块

    - #### setOutputMode

          void setOutputMode(Context context,
                             int mode)

      设置输出模式 Setup ouput mode
      Parameters:
        `context` -
        `mode` - 0:扫描到光标位置(scan content to cursor) 1:剪切板(clipboard) 2:广播(broadcast) 3:模拟键盘(analog keyboard)

    - #### setScanOutTime

          void setScanOutTime(Context context,
                              int time)

      设置超时时间 Setup overtime duration
      Parameters:
        `context` -
        `time` - 超时时间，单位秒 time overtime time, unit is second

    - #### setScanResultBroadcast

          void setScanResultBroadcast(Context context,
                                      java.lang.String broadcastAction,
                                      java.lang.String extraName)

      设置接收扫描数据的广播 Setup broad cast of received scanning data
      Parameters:
        `context` -
        `broadcastAction` - 接收扫描数据的action
        `extraName` - Intent返回的扩展数据项目名称

    - #### openKeyboardHelper

          void openKeyboardHelper(Context context)

      打开键盘助手功能总开关 Switch on main function switch of keyboardemulator
      Parameters:
        `context` -

    - #### closeKeyboardHelper

          void closeKeyboardHelper(Context context)

      关闭键盘助手功能总开关 Switch off main function switch of keyboardemulator
      Parameters:
        `context` -

    - #### enablePlaySuccessSound

          void enablePlaySuccessSound(Context context,
                                      boolean isSuccessSound)

      是否播放成功的提示音 whether playing notification when scanning success.
      Parameters:
        `context` -
        `isSuccessSound` - true:播放成功提示音,false:不播放成功提示音 true: enable false:disable

    - #### enablePlayFailureSound

          void enablePlayFailureSound(Context context,
                                      boolean isFailureSound)

      扫描失败是否播放提示音 whether playing notification when scanning failure.
      Parameters:
        `context` -
        `isFailureSound` - true:播放失败提示音,false:不播放失败提示音 true: enable false:disable

    - #### enableVibrate

          void enableVibrate(Context context,
                             boolean isVibrate)

      扫描成功是否震动提示 whether vibrating when scanning success
      Parameters:
        `context` -
        `isVibrate` - true:震动,false:不震动 true: enable false:disable

    - #### enableEnter

          void enableEnter(Context context,
                           boolean isEnter)

      是否启用回车 Whether enable Enter function
      Parameters:
        `context` -
        `isEnter` - true: 启用回车 false:不启用回车 true: enable false:disable

    - #### enableTAB

          void enableTAB(Context context,
                         boolean isTab)

      是否启用TAB Whether enable TAB function
      Parameters:
        `context` -
        `isTab` - true: 启用回车 false:不启用回车 true: enable false:disable

    - #### setSuffix

          void setSuffix(Context context,
                         java.lang.String suffix)

      设置后缀 Setup suffix
      Parameters:
        `context` -
        `suffix` - 后缀字符

    - #### setPrefix

          void setPrefix(Context context,
                         java.lang.String prefix)

      设置前缀 Setup prefix
      Parameters:
        `context` -
        `prefix` - 前缀字符

    - #### interceptTrimLeft

          void interceptTrimLeft(Context context,
                                 int num)

      截取左边字符串数量 Capture left side charactor string amount
      Parameters:
        `context` -
        `num` - 左边截取的字符数量

    - #### interceptTrimRight

          void interceptTrimRight(Context context,
                                  int num)

      截取右边字符串数量 Capture right side charactor string amount
      Parameters:
        `context` -
        `num` - 右边截取的字符数量

    - #### filterCharacter

          void filterCharacter(Context context,
                               java.lang.String chars)

      过滤字符串 Filter charactor string
      Parameters:
        `context` -
        `chars` - 过滤的字符

    - #### setBarcodeEncodingFormat

          void setBarcodeEncodingFormat(Context context,
                                        int format)

      设置条码编码格式 Setup barcode coding format
      Parameters:
        `context` -
        `format` - 0: Default 1: ASCII 2:GB2312 3:UTF8 4:Unicode 10:GBK, 11:GB18030

    - #### enableContinuousScan

          void enableContinuousScan(Context context,
                                    boolean isContinuous)

      启用连续扫描 Enable continuous scan
      Parameters:
        `context` -
        `isContinuous` - true: 连续扫描 false：单次扫描 true: enable false：disable

    - #### setContinuousScanIntervalTime

          void setContinuousScanIntervalTime(Context context,
                                             int intervalTime)

      设置连续扫描间隔时间 Setup continuous scanning duration
      Parameters:
        `context` -
        `intervalTime` - 间隔时间，单位毫秒 interval Time, (unit: millisecond)

    - #### setContinuousScanTimeOut

          void setContinuousScanTimeOut(Context context,
                                        int timeOut)

      设置连续扫描超时时间 Setup continuous scanning overtime duration
      Parameters:
        `context` -
        `timeOut` - 超时时间，单位秒 time Out(unit:second)

    - #### setScanFailureBroadcast

          void setScanFailureBroadcast(Context context,
                                       boolean enable)

      扫描失败是否发送广播 Send broadcast when scanning failure.
      Parameters:
        `context` -
        `enable` - true:发送 false：不发送

    - #### setReleaseScan

          void setReleaseScan(Context context,
                              boolean enable)

      松开扫描按键是否停止扫描 loose scanning button to stop scanning or not
      Parameters:
        `context` -
        `enable` - true:停止扫描 false：不停止扫描

    - #### setParam_zebra

          void setParam_zebra(Context context,
                              int paramId,
                              int paramValue)

      设置斑马扫描头参数,扫描头上电之后设置一次即可,扫描头断电之后失效。(备注：键盘助手v2.2.0.3 之后的版本才支持)
      Parameters:
        `context` -
        `paramId` - id
        `paramValue` - value