Code example for Camera.Parameters

Methods: set, setRotation

0
						angle
				}); 
		} catch (Exception e) 
		{ 
			Log.d(TAG, "Can't call Camera.setDisplayOrientation on this device, trying another way");
			if (angle == 90 || angle == 270) params.set("orientation", "portrait");
			else if (angle == 0 || angle == 180)  params.set("orientation", "landscape");
		} 
		params.setRotation(angle);
	} 
 
	/** 
	 * @return the default angle of the camera 
	 */ 
	private int angle = 0;
	public int getAngle(){ 
		return angle;
	} 
	private boolean isPreviewSizeSupported(List<Size> prevSizes){
		for (Size size : prevSizes) {
			if(size.width == width && size.height == height)