private int[] mCodeType = new int[]{QRCODE,CODE39, CODE93, CODE128};
GraphicDecoder mGraphicDecoder = new YUVFrameDecoder(this,mCodeType);
if(mGraphicDecoder!=null)
mGraphicDecoder.startDecode();
mCamera.setPreviewCallback(new Camera.PreviewCallback() {
@Override
public void onPreviewFrame(byte[] bytes, Camera camera) {
//Log.d("Camera", "onPreviewFrame():" + bytes.length);
mGraphicDecoder.decode(bytes, frameSizeW,
framewSizeH, null, false);
}
});
@Override
public void decodeComplete(String result, int type, int quality, int requestCode, byte[] rawResult) {
Log.d(TAG,"result "+result+" type"+type);
ToastHelper.showToast(this, "[type:" + type + " ,result:" + result + "]", ToastHelper.LENGTH_SHORT);
}
-
Notifications
You must be signed in to change notification settings - Fork 0
zolad/CodeScanner
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
一个基于ZBar的解码库
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published