Android examples for Camera:Camera Facing
select Camera by facing
import android.hardware.Camera; public class Main{ public static SelectedCamera selectCamera(int facing) { Camera.CameraInfo cameraInfo = new Camera.CameraInfo(); int cameras = Camera.getNumberOfCameras(); for (int i = 0; i < cameras; i++) { Camera.getCameraInfo(i, cameraInfo); if (cameraInfo.facing == facing) { return new SelectedCamera(cameraInfo, i); }/*w w w.jav a2 s . co m*/ } return null; } }