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

2019-02-27 22:00发布

问题:

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