List of utility methods to do Camera Check
void | dumpParameters(Parameters parameters) dump Parameters String flattened = parameters.flatten(); StringTokenizer tokenizer = new StringTokenizer(flattened, ";"); Log.d(TAG, "Dump all camera parameters:"); while (tokenizer.hasMoreElements()) { Log.d(TAG, tokenizer.nextToken()); |
int | getCameraFacingIntentExtras(Activity currentActivity) get Camera Facing Intent Extras int cameraId = -1; int intentCameraId = currentActivity.getIntent().getIntExtra( CameraUtil.EXTRAS_CAMERA_FACING, -1); if (isFrontCameraIntent(intentCameraId)) { int frontCameraId = CameraHolder.instance().getFrontCameraId(); if (frontCameraId != -1) { cameraId = frontCameraId; } else if (isBackCameraIntent(intentCameraId)) { int backCameraId = CameraHolder.instance().getBackCameraId(); if (backCameraId != -1) { cameraId = backCameraId; return cameraId; |
boolean | isAutoExposureLockSupported(Parameters params) is Auto Exposure Lock Supported return TRUE.equals(params.get(AUTO_EXPOSURE_LOCK_SUPPORTED));
|
boolean | isAutoWhiteBalanceLockSupported(Parameters params) is Auto White Balance Lock Supported return TRUE.equals(params.get(AUTO_WHITE_BALANCE_LOCK_SUPPORTED));
|
boolean | isBackCameraIntent(int intentCameraId) is Back Camera Intent return (intentCameraId == android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK);
|
boolean | isCameraHdrSupported(Parameters params) is Camera Hdr Supported List<String> supported = params.getSupportedSceneModes();
return (supported != null) && supported.contains(SCENE_MODE_HDR);
|
boolean | isFocusAreaSupported(Parameters params) is Focus Area Supported return (params.getMaxNumFocusAreas() > 0 && isSupported(
Parameters.FOCUS_MODE_AUTO, params.getSupportedFocusModes()));
|
boolean | isFrontCameraIntent(int intentCameraId) is Front Camera Intent return (intentCameraId == android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT);
|
boolean | isMeteringAreaSupported(Parameters params) is Metering Area Supported return params.getMaxNumMeteringAreas() > 0;
|
boolean | isVideoSnapshotSupported(Parameters params) is Video Snapshot Supported return TRUE.equals(params.get(VIDEO_SNAPSHOT_SUPPORTED));
|