在阅读第二QR code zxing酒吧code扫描仪自动对焦问题 [英] zxing barcode scanner autofocus issue on reading second qr code

查看:1438
本文介绍了在阅读第二QR code zxing酒吧code扫描仪自动对焦问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用斑马线( HTTP://$c$c.google。 COM / p / zxing / )库做QR code阅读Android和iOS。它读取QR首code的伟大工程,但此后它运行到的问题。

I'm using the zxing (http://code.google.com/p/zxing/) library for doing qr code reading on Android and iOS. It works great for reading the first qr code, however then it runs into issues.

这是简单的方式重现是读取QR code,然后将另一QR code在设备的前面。扫描仪将无法读取新的QR code。从而使QR code是移动设备完全关闭屏幕,然后移动设备目光集中到了QR code后,将成功地读取它。

An easy way to reproduce is to read a qr code, and then place another qr code in front of the device. The scanner will not read the new qr code. After moving the device so that the qr code is completely off the screen, then moving the device to refocus on the qr code, it will read it successfully.

有没有zxing,我可以鼓捣一些自动对焦设置?或者是有办法重置扫描器读第一code后,使其将准备读第二code?

Is there some autofocus setting in zxing that I can tinker with? Or is there a way to "reset" the scanner after reading the first code so that it will be ready to read the second code?

我还要提到的是我使用zxing作为内钛的模块。

I should also mention that I'm using zxing as a module within Titanium.

推荐答案

我认为这是相机的权限问题,
你给自动对焦许可等权限?

I think it's camera permission issue, have you give auto focus permission and other permissions?

我爱:

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.FLASHLIGHT"/>

如果你还得到一个错误然后添加更多的权限尽量具体如下:

And if you still get an error then try with adding more permissions as listed below:

<uses-feature
        android:name="android.hardware.camera"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.front"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.flash"
        android:required="false" />
    <uses-feature android:name="android.hardware.screen.landscape" />
    <uses-feature
        android:name="android.hardware.wifi"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />
    <uses-feature android:name="android.hardware.camera" />

这篇关于在阅读第二QR code zxing酒吧code扫描仪自动对焦问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆