Code example for Camera.Parameters

Methods: set, setRecordingHint

0
 
	@SuppressLint("NewApi") 
	private void defineCameraParameters() { 
		Parameters cameraParameters = mCamera.getParameters();
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
			cameraParameters.setRecordingHint(true);
		cameraParameters.set("cam_mode", 1);
		mCamera.setParameters(cameraParameters);
	} 
 
	@Override 
	public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
 
		if (mHolder.getSurface() == null)
			return; 
 
		try { 
			mCamera.stopPreview();
		} catch (Exception e) {
			e.printStackTrace();
			Log.e(getClass().getName(), e.getMessage());