android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo(); android.hardware.Camera.getCameraInfo(cameraId, info); if (info.facing == CameraInfo.CAMERA_FACING_FRONT) { //前置摄像头 } else { // 后置摄像头 }
android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo(); android.hardware.Camera.getCameraInfo(cameraId, info); if (info.facing == CameraInfo.CAMERA_FACING_FRONT) { //前置摄像头 } else { // 后置摄像头 }