Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Camera in the Android emulator

I wish to simulate camera in the android emulator using the webcam. Basically I need to only take photos with the camera in the emulator (live preview is not needed i.e if it makes it any easier)

I followed the tutorial here which is the only one I could find that was close to my requirements

But many of the libraries used in that tutorial(like android.hardware.CameraDevice) are not available in present sdk and are replaced by new libraries(like android.hardware.camera).

Any help on how to do this in the present sdk(2.1 or 2.2) would be much appreciated.

like image 961
Primal Pappachan Avatar asked May 21 '10 18:05

Primal Pappachan


People also ask

How do I enable the front camera on my emulator?

You need to edit your AVD so that in the hardware section either "Configures camera facing front" or "Configures camera facing back" are available. One, but not both, of the values for these properties should be set to "webcam0" (or whatever is available).

How do I use the camera on NOX emulator?

How Do I Enable The Camera On My Emulator? To edit (pencil) in Android Studio's actions, open the AVD Manager and then click on edit. In the next window, go to Advanced settings, then scroll down and in the camera settings option, click back on webcam.


2 Answers

In your AVD advanced settings, you should be able to set front and back cameras to Webcam() or Emulated.

enter image description here

like image 58
Adam Johns Avatar answered Oct 03 '22 06:10

Adam Johns


Update: ICS emulator supports camera.

like image 31
Paramvir Singh Avatar answered Oct 03 '22 07:10

Paramvir Singh