Code example for Camera.Parameters

Methods: flatten, getSupportedPictureSizes, setPictureFormat, setPreviewSize

0
		 } 
		  
		 public void surfaceChanged(SurfaceHolder holder,int format, int width,int height) { 
			  
			 Parameters parameters=camera.getParameters(); 
			 List<Size> supportedSizes = parameters.getSupportedPictureSizes(); 
			 if(supportedSizes != null){ 
		 		 Size gb = supportedSizes.get(supportedSizes.size()-1); 
				 height = gb.height; 
				 width = gb.width; 
		 	 }else{ 
		 		parameters.setPreviewSize(width,height); 
		 	 } 
			 parameters.setPictureFormat(PixelFormat.JPEG); 
			 Log.i("NexusFix", "parameters: "+parameters.flatten()); 
			 camera.setParameters(parameters); 
			 camera.startPreview(); 
		 } 
		  
		 public void surfaceDestroyed(SurfaceHolder holder) { 
			 camera.stopPreview();