【支持功能】: 1.生成二维码; 2.扫描二维码; 3.扫描图片二维码; 4.扫描过程打开手电筒;
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.lmiot:LmiotZxingSDK:1.2'
}
ZxingSdk.startScan(MainActivity.this, new ZxingSdk.onResultLitener() {
@Override
public void result(String result) {
Log.d("二维码扫描结果", result);
}
});
ZxingSdk.CreateQRCode("https://www.baidu.com/", new ZxingSdk.onQRCodeLitener() {
@Override
public void result(Bitmap bitmap) {
if(bitmap!=null){
mImageView.setImageBitmap(bitmap);
}
}
});