title: How can I find the orientation of a picture taken with Intent MediaStore.ACTION_IMAGE_CAPTURE?
body: <p>When I take a picture with Android's camera app, it detects the phone's orientation and saves the picture accordingly. So if I take a picture of a building, the roof will be on the topside, whether I hold the phone in landscape position or portrait.</p>
  
  <p>However, when I use</p>
  
  <pre><code>Intent imageCaptureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  </code></pre>
  
  <p>to get a picture, the camera app doesn't react to the orientation.
  If I hold the phone vertically (portrait), the resulting picture will be rotated, with said building's roof to the left of the screen.</p>
  
  <p>How can I set the intent so that the camera will take the orientation into account?</p>
  
  <p>Or can I deduce in some way in what orientation the picture was taken and rotate it myself afterwards?</p>
  
  <p>Or is there another way?</p>