public class KeyboardEmulator2DDecoder_mtk extends BarcodeDecoder
BarcodeDecoder.DecodeCallback, BarcodeDecoder.IBarcodeImageCallback
DECODE_CANCEL, DECODE_ENGINE_ERROR, DECODE_FAILURE, DECODE_SUCCESS, DECODE_TIMEOUT
限定符和类型 | 方法和说明 |
---|---|
void |
close()
关闭二维扫描设备
Switch off 2D barcode scannning device |
static boolean |
isEnable() |
boolean |
open(Context context)
打开二维扫描设备
Switch on 2D scanning device |
void |
setDecodeCallback(BarcodeDecoder.DecodeCallback scanCallbackListener)
设置回调对象接收条码数据,主线程回调
Setup call-back target to acquire barcode data. |
static void |
setEnable(boolean flag) |
boolean |
setParameter(int paramNum,
int paramVal)
设置扫描头参数
Setup scanning module parameter |
void |
setTimeOut(int timeOut)
设置超时时间
setup time-out duration |
boolean |
startScan()
触发二维条码扫描
Trigger 2D barcode scanning function |
void |
stopScan()
终止扫描
Scanning terminated |
getDecoderSVersionInfo, getLastDecImage, isOpen
public boolean open(Context context)
BarcodeDecoder
open
在类中 BarcodeDecoder
public void close()
BarcodeDecoder
close
在类中 BarcodeDecoder
public boolean startScan()
BarcodeDecoder
startScan
在类中 BarcodeDecoder
public void stopScan()
BarcodeDecoder
stopScan
在类中 BarcodeDecoder
public void setDecodeCallback(BarcodeDecoder.DecodeCallback scanCallbackListener)
BarcodeDecoder
setDecodeCallback
在类中 BarcodeDecoder
public void setTimeOut(int timeOut)
BarcodeDecoder
setTimeOut
在类中 BarcodeDecoder
timeOut
- 超时时间,单位:秒(timeOut,Unit: second)public boolean setParameter(int paramNum, int paramVal)
setParameter
在类中 BarcodeDecoder
paramNum
- paramNumparamVal
- paramValpublic static boolean isEnable()
public static void setEnable(boolean flag)