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.


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

enter image description here


Update: ICS emulator supports camera.


Some elaboration, in the hope of clarifying what has already been said:

As stated above, Webcams are supported natively in the current SDK, but only on recent android versions (4.0 and higher)

Webcam detection is automatic where present. In 4.0.3, the camera defaults to the front-facing camera so a lot of applications (especially pre-2.3 applications, which can only fetch the default camera, i.e. the back-facing one) will still show you the old checkerbox-with-moving-square stand-in instead.

I think some more info is available in the following post: Camera on Android Eclipse emulator:

Or at least, that's the most information I've been able to find--aside from the brief, uninformative statements in the release notes for the SDK tools.