title: Android API Version Compatibility
body: <p>I'd like my app to run on both Android versions 2.1 and 2.2. 
  In one area of my app, there is a portrait-style camera - the process for producing a portrait camera preview is different (as far as I know) on the two OS versions.  Here is how:</p>
  
  <h2>2.1:</h2>
  
  <pre><code>Camera.Parameters parameters = camera.getParameters();
  parameters.set("orientation", "portrait");
  camera.setParameters(parameters);
  </code></pre>
  
  <h2>2.2:</h2>
  
  <pre><code>camera.setDisplayOrientation(90);
  </code></pre>
  
  <p>the setDisplayOrientation(int) method became available in API Level 8 (2.2) and, so, cannot be used on 2.1; however, using the 2.1 (Camera.Parameters) method does not rotate the preview and image correctly on 2.2.</p>
  
  <p>It seems odd that this incompatibility exists - is there a more correct way to do this that will allow me to target both platforms?</p>