Code example for Camera.Parameters

Methods: set, setPictureFormat, setPreviewSize

0
		// reformatting changes here 
 
		// start preview with new settings 
		try { 
			Parameters params = camera.getParameters();
			params.setPreviewSize(width, height);
			params.setPictureFormat(PixelFormat.JPEG);
			params.set("orientation", "landscape");
			camera.setParameters(params);
			camera.setPreviewDisplay(previewHolder);
			camera.startPreview();
 
		} catch (Exception e) {
			// Log.d(TAG, "Error starting camera preview: " + e.getMessage()); 
		} 
	} 
 
	public void surfaceDestroyed(SurfaceHolder arg0) {
		camera.stopPreview();
		camera.release();
Stop searching for code, let great code find you!  Add Codota to your java IDE