r/AndroidStudio • u/PlatoHero_ • 1d ago
Using the camera of an Android Virtual Device without a web-camera
I am trying to test camera-related features on an AVD.
Since I don't have a webcam, I thought I could use the "Emulated" option in the "Edit" section of the device manager. But, it results in the same video feed, which I seem to be incapable of customizing anyhow.
I also tried using the OBS virtual camera, but to no avail. None of the camera options of the device manager would result in proper streaming of the video feed. I have tested the OBS virtual camera on other executables and it works fine.
Is there anything I am doing wrong? Some option I haven't considered?
1
u/DickBrainTime 20h ago
Try VirtualScene instead of Emulated for the AVD camera. Google says Emulated uses a software-generated feed, while VirtualScene lets you put your own image into the scene. In the running emulator, open the three-dot Extended controls > Camera > Virtual scene images > Add image, then choose a PNG or JPEG.
That should help if you're testing things like QR codes or still images. It isn't a replacement for a live OBS video stream, though. Are you trying to test a static image or actual moving video?