List of utility methods to do Camera Set
void | setVideoStabilization(Camera.Parameters parameters) set Video Stabilization if (parameters.isVideoStabilizationSupported()) { if (parameters.getVideoStabilization()) { Log.i(TAG, "Video stabilization already enabled"); } else { Log.i(TAG, "Enabling video stabilization..."); parameters.setVideoStabilization(true); } else { ... |
void | setZoom(Camera.Parameters parameters, double targetZoomRatio) set Zoom if (parameters.isZoomSupported()) { Integer zoom = indexOfClosestZoom(parameters, targetZoomRatio); if (zoom == null) { return; if (parameters.getZoom() == zoom) { Log.i(TAG, "Zoom is already set to " + zoom); } else { ... |
int | getBackId() get Back Id int numberOfCameras = Camera.getNumberOfCameras(); CameraInfo cameraInfo = new CameraInfo(); for (int i = 0; i < numberOfCameras; i++) { Camera.getCameraInfo(i, cameraInfo); if (cameraInfo.facing == CameraInfo.CAMERA_FACING_BACK) { return i; throw new Exception(); |
void | adjustCamera(Context context, Camera camera) adjust Camera if (context.getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE) { camera.setDisplayOrientation(90); } else { camera.setDisplayOrientation(0); |