public class Barcode2D_mtk extends java.lang.Object implements IBarcode2D
注意:
Attention:
1、使用前请确认您的机器已安装此模块。
1. Make sure the module is installed before using.
2、要正常使用模块需要在\libs\armeabi\目录放置libDeviceAPI.so文件。
2. Put the file libDeviceAPI.so in directory \libs\armeabi\ then module can be used normally.
3、在操作设备前需要调用 open()
打开设备,使用完后调用 Barcode2D#close()
3. Before operating, call open()
to switch on the device, after using call Barcode1D#close()
to
关闭设备
switch off the device.
Modifier and Type | Method and Description |
---|---|
boolean |
close()
关闭二维扫描设备
Switch off 2D barcode scanning device. |
static Barcode2D_mtk |
getInstance()
获取二维条码操作实例
* Acquire 2D barcode operation Instance. |
boolean |
isPowerOn()
判断设备是否上电
Judge the device is powered on or not. |
boolean |
open()
打开二维扫描设备
Switch on 1D scanning device. |
boolean |
open(Context context)
打开二维扫描设备
Switch on 1D scanning device. |
java.lang.String |
scan()
触发一次条码扫描
Enable barcode scanning for 1 time. |
byte[] |
scanBarcode()
触发一次条码扫描
Enable barcode scanning for 1 time. |
void |
setTimeOut(int time)
设置超时时间
set time out. |
boolean |
stopScan()
终止扫描
Scanning terminated |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isPowerOn
public static Barcode2D_mtk getInstance() throws ConfigurationException
ConfigurationException
- 配置错误异常public boolean open()
open
in interface IBarcode2D
public boolean open(Context context)
open
in interface IBarcode2D
public java.lang.String scan()
scan
in interface IBarcode2D
public byte[] scanBarcode()
scanBarcode
in interface IBarcode2D
public boolean stopScan()
stopScan
in interface IBarcode2D
public boolean close()
close
in interface IBarcode2D
public void setTimeOut(int time)
setTimeOut
in interface IBarcode2D
time(500-10000
- ms) 超时时间public boolean isPowerOn()