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
Asked
Active
Viewed 1,749 times
3
-
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 Answers
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-
Start the emulator command:
cd C:\Users\%USERNAME%\AppData\Local\Android\Sdk\emulator
Check the Available AVD and webcams
List of AVDs::
emulator -list-avds
Webcam Lists:
emulator @AVD_NAME_FROM_THE_ABOVE_LIST -webcam-list
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

user1216158
- 81
- 8