Code example for Camera.Parameters

Methods: setFocusMode, setSceneMode

0
		//parameters.setFlashMode(Parameters.FLASH_MODE_TORCH);//FLASH_MODE_AUTO, FLASH_MODE_ON, FLASH_MODE_OFF, FLASH_MODE_TORCH, FLASH_MODE_RED_EYE 
		 
		//parameters.setFocusAreas(); //Each focus area is a rectangle with specified weight. The direction is relative to the sensor orientation,  
							//that is, what the sensor sees.Only works when the following Focus Modes are enabled FOCUS_MODE_AUTO, FOCUS_MODE_MACRO, FOCUS_MODE_CONTINUOUS_VIDEO, or FOCUS_MODE_CONTINUOUS_PICTURE	 
		 
		parameters.setFocusMode(Parameters.FOCUS_MODE_AUTO); //FOCUS_MODE_AUTO, FOCUS_MODE_INFINITY, FOCUS_MODE_MACRO, FOCUS_MODE_FIXED, FOCUS_MODE_EDOF, FOCUS_MODE_CONTINUOUS_VIDEO
		  
		//parameters.setMeteringAreas(List<Camera.Area> meteringAreas) //Sets the metering area, which in combo with the focus area decides exposure 
		 
		//parameters.setPictureFormat() //ImageFormat.NV21 (preview format), ImageFormat.RGB_565 (16-bit color), or ImageFormat.JPEG 
		 
		//parameters.setPreviewFpsRange (5000, 120000); // Check what is supported by the camera with getSupportedPreviewFpsRange() the range 5000-120000 is the only range supported by Nexus4 
		 
		//parameters.setRotation() -- you can use 0, 90, 180, or 270 here 
		 
		parameters.setSceneMode(Parameters.SCENE_MODE_AUTO); 
		/*You can use the following (depending on camera) 
		 *  SCENE_MODE_ACTION	Take photos of fast moving objects. 
			SCENE_MODE_AUTO	Scene mode is off. 
			SCENE_MODE_BARCODE	Applications are looking for a barcode. 
			SCENE_MODE_BEACH	Take pictures on the beach.