Code example for Camera.Parameters

Methods: set

		// The Surface has been created, acquire the camera and tell it where to 
		// draw. 
		mCamera =;
		Parameters params = mCamera.getParameters();
		params.set("orientation", "portait");
		// If we aren't landscape (the default), tell the camera we want 
		// portrait mode 
		if (this.getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE) {
			params.set("orientation", "portrait"); // "landscape"
			// And Rotate the final picture if possible 
			// This works on 2.0 and higher only 
			// params.setRotation(90); 
			// Use reflection to see if it exists and to call it so you can 
			// support older versions 
			try { 
				Method rotateSet = Camera.Parameters.class.getMethod(
						"setRotation", new Class[] { Integer.TYPE });
				Object arguments[] = new Object[] { new Integer(90) };
				rotateSet.invoke(params, arguments);