title: Getting rotation from ExifInterface always returns 0
body: <p>I'm passing a bitmap via bundle on <code>onActivityResult</code> from a camera. </p>
  
  <pre><code>Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  ContentValues values = new ContentValues();
  values.put(MediaStore.Images.Media.TITLE, "picture");
  mCapturedImageURI =     getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
      intent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageURI);
  
  startActivityForResult(intent, REQUEST_TAKE_PHOTO); 
  </code></pre>
  
  <p>I can get the bitmap:</p>
  
  <pre><code>Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), mCapturedImageURI);
  </code></pre>
  
  <p>However, I've noticed that the image is rotated on some devices. After searching posts on here, the typical solution seemed to get the rotation via:</p>
  
  <pre><code>String path = mCapturedImageURI.getPath();
  ExifInterface exif = new ExifInterface(path);
  int rotation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
  </code></pre>
  
  <p>Unfortunately, my <code>int rotation</code> is always 0 even though the bitmap is rotated. </p>
  
  <p>I've also tried this which worked when I uploaded a picture already on the device but the orientation is still 0:</p>
  
  <pre><code>String[] orientationColumn = {MediaStore.Images.Media.ORIENTATION};
  Cursor cur = managedQuery(mCapturedImageURI, orientationColumn, null, null, null);
  if (cur != null &amp;&amp; cur.moveToFirst()) {
        orientation = cur.getInt(cur.getColumnIndex(orientationColumn[0]));
  }
  </code></pre>
  
  <p>Anyone see anything I may be doing wrong here? Or another workaround?</p>
  
  <p>Generally, the bitmap is rotated 90 degrees counter-clockwise with the back camera and 90 degrees clockwise with the front camera. Works ok on Moto G. Rotated on Galaxy S3 and LG G2.</p>