I’m designing an app (on version 2.2) that use the camera to capture photos.
I read from http://developer.android.com/sdk/android-2.3.html that version 2.3 and above have multiple cameras support. But i’m still a bit confused because when the camera is launched, it normally have a button that the user can click to switch between front-facing and rear cameras, right?
or
2.2 doesn’t have this switch?
I want the user to be able to use both front and rear cameras. Is it possible on version 2.2 or should I use 2.3 and above?
Yes, 2.2 can only manage rear camera.
For frontal camera you need to upgrade to 2.3+.
With this simple function it check whether the phone has a frontal or rear camera, and return the best.
The id returned can be used in the Camera.open(id) to select the desired camera.
If in your Manifest you write:
and you develop your project with libraries 2.3 (or +), the function i have posted works like a charm!
I’ve used in a camera project, so trust me 😉