eclipse 我可以在没有网络摄像头的情况下使用 Android 模拟器扫描 QrCode 吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6660740/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can I scan a QrCode with the Android emulator without a Webcam?
提问by grattmandu03
I'm trying to understand the API zxing to develop my own barcode scanner by doing many tests. Right now I'm using an Android terminal, but it's not the best solution. So is there a solution to scan a QrCode with the Android Emulator and without a webcam? I imagined something like using an image placed into the SDCard.
我试图通过进行许多测试来了解 API zxing 以开发我自己的条形码扫描仪。现在我正在使用 Android 终端,但这不是最好的解决方案。那么,有没有使用 Android Emulator 扫描 QrCode 而无需网络摄像头的解决方案?我想象了一些像使用放入 SDCard 的图像。
(I'm using Eclipse with the Android SDK to develop this and I don't have a webcam.)
(我使用带有 Android SDK 的 Eclipse 来开发它,但我没有网络摄像头。)
回答by Janusz
You need a camera for scanning a QR code. Until now the emulator does not support taking pictures. If you can't get your hands on a test device with a camera testing QR code apps will be very hard.
您需要一个摄像头来扫描二维码。到目前为止,模拟器不支持拍照。如果您无法使用带有摄像头的测试设备来测试 QR 码应用程序将非常困难。
回答by grattmandu03
Thanks for your answers, but I haven't a webcam on my computer (I edited my question).
感谢您的回答,但我的电脑上没有网络摄像头(我编辑了我的问题)。
I found a solution which in which a picture (QrCode, FlashCode,...) is placed on the SD Card of the emulator. Unfortunately it works only with the release 1.3 of zxing.
我找到了一个解决方案,其中将图片(QrCode、FlashCode...)放在模拟器的 SD 卡上。不幸的是,它仅适用于 zxing 1.3 版。
So if anybody have an idea to do this with the last release, I would like to study it.
因此,如果有人有想法在最后一个版本中做到这一点,我想研究一下。
回答by Kevin Qiu
I found something online that lets you use your computer's webcam as the camera in the emulator. Give it a try. Live Camera Previews in Android
我在网上找到了一些东西,可以让您将计算机的网络摄像头用作模拟器中的摄像头。试一试。Android 中的实时相机预览