How to use a PC webcam as the emulator's camera

狂风中的少年 提交于 2019-12-02 11:43:42

问题


I'm developing a qr code reader application. How can I use my webcam as a camera to scan the qr code in the emulator ?

my SDK version is 4.3. I checked it out in developer.android site and they said that you have to select webcam0 as a back camera. I tried but it didn't work, and shows "unfortunately your app has been stopped".


回答1:


Follow the below steps in Eclipse.

  1. Goto -> AVD Manager
  2. Create/Edit the AVD.
  3. Hardware > New:
  4. Configures camera facing back
  5. Click on the property value and choose = "webcam0".
  6. Once done all the above the webcam should be connected. If it doesnt then you need to check your WebCam drivers.

check this answer for the image & a further link:

Here




回答2:


Have you set front/Back cameras when you created the emulator like this in your AVD manager




回答3:


The Android Studio virtual emulator now has virtual scene images under the camera section of the extended controls. With this you add any image to be scanned by the virtual emulator. Had a little trouble finding it though as you have to navigate into a different room to see it in the virtual scene. Can't see virtual scene images in emulator camera app



来源:https://stackoverflow.com/questions/18381344/how-to-use-a-pc-webcam-as-the-emulators-camera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!