3

I am trying to access Webcam(connected using USB)from the android studio AVD. I have selected "webcam0" in avd camera setting but it is taking the laptop's default camera. I want to access the webcam that is connected using USB. Any idea, please? Android studio AVD camera settings

  • Does this answer your question? https://stackoverflow.com/questions/44699625/make-android-emulator-use-physical-usb-camera – null_override Sep 18 '20 at 08:50
  • 1
    @null_override, Yes, solved the issue with the following link.Thank you very much. https://developer.android.com/studio/run/emulator-commandline – user1216158 Sep 21 '20 at 09:03

1 Answers1

5

I have solved the issue using the link below.

https://developer.android.com/studio/run/emulator-commandline

It worked with windows and the steps are-

  1. Start the emulator command: cd C:\Users\%USERNAME%\AppData\Local\Android\Sdk\emulator

  2. Check the Available AVD and webcams

    List of AVDs:: emulator -list-avds

    Webcam Lists: emulator @AVD_NAME_FROM_THE_ABOVE_LIST -webcam-list

  3. Run AVD by assigning a specific camera from the list of available webcams

    emulator @AVD_NAME_FROM_THE_ABOVE_LIST -camera-back webcam1 Here webcam1 is assigned to the back camera. The front camera can also be changed with the command below.

emulator @AVD_NAME_FROM_THE_ABOVE_LIST -camera-front webcam1
JeffUK
  • 4,107
  • 2
  • 20
  • 34