is Camera Facing Back - Android Camera

Android examples for Camera:Back Camera

Description

is Camera Facing Back

Demo Code


//package com.java2s;

import android.hardware.Camera;

public class Main {
    public static boolean isCameraFacingBack(int cameraID) {
        Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
        Camera.getCameraInfo(cameraID, cameraInfo);
        return (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK);
    }/* w  w  w .  ja  va  2  s  .com*/
}

Related Tutorials