没有任何QR码被解码。甚至是来自zxing的人。 还是根本没有读取QR码吗?
package com.pavan.secureqr;
import android.app.Activity;
import android.graphics.PointF;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import com.dlazaro66.qrcodereaderview.QRCodeReaderView;
public class ScanActivity extends Activity implements
QRCodeReaderView.OnQRCodeReadListener {
private QRCodeReaderView decoder;
private TextView myText;
static final String tag="ScanActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.scan_activity);
decoder = (QRCodeReaderView) findViewById(R.id.qrdecoderview);
decoder.setOnQRCodeReadListener(this);
myText= (TextView) findViewById(R.id.decodedText);
}
@Override
public void onQRCodeRead(String s, PointF[] pointFs) {
myText.setText(s);
}
@Override
public void cameraNotFound() {
}
@Override
public void QRCodeNotFoundOnCamImage() {
}
}
logcat的: 04-18 22:30:06.359 13672-13672 / com.pavan.secureqr I / CameraConfiguration:初始相机参数:antianding = auto; antianding-values = off,60hz,50hz,auto; auto-exposure-lock = false; auto - 曝光锁支持= TRUE;自动最大光圈锁= FALSE;自动最大光圈锁支持= TRUE;效果=无;效果值=无,单声道,负,曝光过度,棕褐色,色调分离,白板,黑板,水中;曝光补偿= 0;曝光补偿步= 0.166667;焦距= 3.5;对焦距离=无限,无穷远,无穷远;将对焦模式=固定的;将对焦模式值=固定;水平视-angle = 54.9; JPEG-质量= 95; JPEG缩略图高度= 384; JPEG缩略图品质= 85; JPEG缩略图大小的值= 512x384,512x288,480x288,256x154,432x288,320x240,176x144,0x0 ; JPEG缩略图宽度= 512;最大曝光补偿= 12; MAX-NUM-被测面-HW = 5;最大-NUM-被测面-SW = 5;最大-NUM-聚焦区域= 0 ; MAX-NUM-计量-领域= 1;最大变焦= 60;计量-区=(0,0,0,0,0);最小曝光补偿= -12;画面格式= JPEG;图像 - 格式值= JPEG; PIC TURE尺寸= 2592×1944;图像尺寸值= 2592x1944,2592x1456,2048x1536,1920x1080,1600x1200,1440x1080,1280x960,1280x768,1280x720,1024x768,800x600,800x480,720x480,640x480;优选预览大小换视频= 960×540;预览格式= yuv420sp;预览格式值= yuv420sp,YUV420P;预览FPS-范围= 15000,30000;预览FPS-范围值=(15000,15000),(15000,30000);预览 - 帧速率= 30;预览帧率值= 15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30;预览大小= 1280×720;预览 - 大小 - 值= 1280x720,960x540,864x480,800x480,768x432,720x480,640x480,576x432,480x320,384x288,352x288,320x240,240x160,176x144;场景模式=自动;场景模式值=汽车, HDR,auto_hdr;平滑变焦支持= TRUE;垂直视角= 42.5;视频帧格式= yuv420sp;视频 - 大小 - 值= 960x540,864x480,800x480,720x480,640x480,480x320,352x288,320x240, 176×144;视频快照支持= TRUE;视频稳定支持= FALSE;最大光圈=汽车;最大光圈值=汽车,白炽灯,荧光灯,日光,阴天,日光;变焦= 0;放大-R atios = 100,102,104,107,109,112,114,117,120,123,125,128,131,135,138,141,144,148,151,155,158,162,166,170,174,178,182,186,190,195,200,204,209,214,219,224,229,235,240,246,251,257,263,270,276,282,289,296,303,310,317,324,332,340,348,356,364,373,381,390,400;支持变焦=真 04-18 22:30:06.359 13672-13672 / com.pavan.secureqr I / CameraConfiguration:支持的值:[已修复] 04-18 22:30:06.359 13672-13672 / com.pavan.secureqr I / CameraConfiguration:可设置值:null 04-18 22:30:06.366 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:surfaceChanged 04-18 22:30:06.491 13672-13672 / com.pavan.secureqr I / PlatformSupportManager:使用com.google.zxing.client.android接口的com.google.zxing.client.android.common.executor.HoneycombAsyncTaskExecInterface实现类SDK 11的.common.executor.AsyncTaskExecInterface 04-18 22:30:06.493 13672-13672 / com.pavan.secureqr I / AutoFocusManager:当前对焦模式'已修复&#39 ;;使用自动对焦?假 04-18 22:30:06.740 13672-13685 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1673K,35%免费7173K / 11032K,暂停10ms,总计29ms 04-18 22:30:06.982 13672-13684 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1761K,35%免费7172K / 11032K,暂停18ms,总计18ms 04-18 22:30:07.161 13672-14288 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1718K,35%免费7172K / 11032K,暂停14ms,总计14ms 04-18 22:30:07.375 13672-13685 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放2290K,41%免费6600K / 11032K,暂停11ms,总计11ms 04-18 22:30:07.562 13672-14283 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1145K,35%免费7172K / 11032K,暂停14ms,总计14ms 04-18 22:30:07.817 13672-14288 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1674K,35%免费7173K / 11032K,暂停41ms,总计41ms 04-18 22:30:07.898 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:surfaceDestroyed 04-18 22:30:34.039 13672-13678 / com.pavan.secureqr D / dalvikvm:调试器已分离;对象注册表有1个条目 04-18 22:31:01.068 13672-13672 / com.pavan.secureqr I / PlatformSupportManager:使用com.google.zxing.client.android接口的com.google.zxing.client.android.camera.open.GingerbreadOpenCameraInterface实现类SDK 9的.camera.open.OpenCameraInterface 04-18 22:31:01.111 13672-13672 / com.pavan.secureqr I / GingerbreadOpenCamera:打开相机#0 04-18 22:31:01.457 13672-13672 / com.pavan.secureqr I / CameraConfiguration:屏幕分辨率:Point(540,850) 04-18 22:31:01.458 13672-13672 / com.pavan.secureqr I / CameraConfiguration:支持的预览尺寸:1280x720 960x540 864x480 800x480 720x480 768x432 640x480 576x432 480x320 384x288 352x288 320x240 240x160 176x144 04-18 22:31:01.458 13672-13672 / com.pavan.secureqr I / CameraConfiguration:找到最佳近似预览尺寸:Point(720,480) 04-18 22:31:01.458 13672-13672 / com.pavan.secureqr I / CameraConfiguration:摄像头分辨率:Point(720,480) 04-18 22:31:01.463 13672-13672 / com.pavan.secureqr I / CameraConfiguration:初始相机参数:抗静电=自动;抗结合值=关闭,60hz,50hz,自动;自动曝光锁定=假;自动 - 曝光锁支持= TRUE;自动最大光圈锁= FALSE;自动最大光圈锁支持= TRUE;效果=无;效果值=无,单声道,负,曝光过度,棕褐色,色调分离,白板,黑板,水中;曝光补偿= 0;曝光补偿步= 0.166667;焦距= 3.5;对焦距离=无限,无穷远,无穷远;将对焦模式=固定的;将对焦模式值=固定;水平视-angle = 54.9; JPEG-质量= 95; JPEG缩略图高度= 384; JPEG缩略图品质= 85; JPEG缩略图大小的值= 512x384,512x288,480x288,256x154,432x288,320x240,176x144,0x0 ; JPEG缩略图宽度= 512;最大曝光补偿= 12; MAX-NUM-被测面-HW = 5;最大-NUM-被测面-SW = 5;最大-NUM-聚焦区域= 0 ; MAX-NUM-计量-领域= 1;最大变焦= 60;计量-区=(0,0,0,0,0);最小曝光补偿= -12;画面格式= JPEG;图像 - 格式值= JPEG; PIC TURE尺寸= 2592×1944;图像尺寸值= 2592x1944,2592x1456,2048x1536,1920x1080,1600x1200,1440x1080,1280x960,1280x768,1280x720,1024x768,800x600,800x480,720x480,640x480;优选预览大小换视频= 960×540;预览格式= yuv420sp;预览格式值= yuv420sp,YUV420P;预览FPS-范围= 15000,30000;预览FPS-范围值=(15000,15000),(15000,30000);预览 - 帧速率= 30;预览帧率值= 15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30;预览大小= 1280×720;预览 - 大小 - 值= 1280x720,960x540,864x480,800x480,768x432,720x480,640x480,576x432,480x320,384x288,352x288,320x240,240x160,176x144;场景模式=自动;场景模式值=汽车, HDR,auto_hdr;平滑变焦支持= TRUE;垂直视角= 42.5;视频帧格式= yuv420sp;视频 - 大小 - 值= 960x540,864x480,800x480,720x480,640x480,480x320,352x288,320x240, 176×144;视频快照支持= TRUE;视频稳定支持= FALSE;最大光圈=汽车;最大光圈值=汽车,白炽灯,荧光灯,日光,阴天,日光;变焦= 0;放大-R atios = 100,102,104,107,109,112,114,117,120,123,125,128,131,135,138,141,144,148,151,155,158,162,166,170,174,178,182,186,190,195,200,204,209,214,219,224,229,235,240,246,251,257,263,270,276,282,289,296,303,310,317,324,332,340,348,356,364,373,381,390,400;支持变焦=真 04-18 22:31:01.463 13672-13672 / com.pavan.secureqr I / CameraConfiguration:支持的值:[已修复] 04-18 22:31:01.463 13672-13672 / com.pavan.secureqr I / CameraConfiguration:可设置值:null 04-18 22:31:01.576 13672-13672 / com.pavan.secureqr I / PlatformSupportManager:使用com.google.zxing.client.android接口的com.google.zxing.client.android.common.executor.HoneycombAsyncTaskExecInterface实现类SDK 11的.common.executor.AsyncTaskExecInterface 04-18 22:31:01.578 13672-13672 / com.pavan.secureqr I / AutoFocusManager:当前焦点模式'已修复&#39 ;;使用自动对焦?假 04-18 22:31:01.578 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:surfaceChanged 04-18 22:31:01.798 13672-13672 / com.pavan.secureqr I / PlatformSupportManager:使用com.google.zxing.client.android接口的com.google.zxing.client.android.common.executor.HoneycombAsyncTaskExecInterface实现类SDK 11的.common.executor.AsyncTaskExecInterface 04-18 22:31:01.800 13672-13672 / com.pavan.secureqr I / AutoFocusManager:当前对焦模式'已修复&#39 ;;使用自动对焦?假 04-18 22:31:02.105 13672-13684 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1843K,35%免费7238K / 11032K,暂停34ms,总计47ms 04-18 22:31:02.298 13672-14288 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1737K,35%免费7175K / 11032K,暂停15ms,总计15ms 04-18 22:31:02.590 13672-13685 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1761K,35%免费7175K / 11032K,暂停35ms,总计35ms 04-18 22:31:02.690 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:02.690 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:02.840 13672-14283 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1680K,35%免费7175K / 11032K,暂停42ms,总计42ms 04-18 22:31:03.157 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:03.157 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:03.212 13672-13684 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1769K,36%免费7131K / 11032K,暂停48ms,总计48ms 04-18 22:31:03.341 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:03.341 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:03.477 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:03.477 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:03.658 13672-14288 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1736K,35%免费7175K / 11032K,暂停24ms,总计24ms 04-18 22:31:03.868 13672-13685 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1718K,35%免费7175K / 11032K,暂停18ms,总计18ms 04-18 22:31:03.958 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:03.958 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:04.031 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:04.031 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:04.062 13672-14283 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1728K,36%免费7131K / 11032K,暂停14ms,总计14ms 04-18 22:31:04.135 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:04.135 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:04.208 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:04.209 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:04.309 13672-13672 / com.pavan.secureqr D / com.dlazaro66.qrcodereaderview.QRCodeReaderView:ChecksumException 04-18 22:31:04.309 13672-13672 / com.pavan.secureqr W / System.err:com.google.zxing.ChecksumException 04-18 22:31:04.342 13672-13684 / com.pavan.secureqr D / dalvikvm:GC_FOR_ALLOC释放1738K,36%免费7131K / 11032K,暂停26ms,总计26ms