I've found a very interesting problem. After taking a camera picture (I hold the device in portrait mode, and not rotating), the given photo is sometimes rotated, but not always. I know, some device give always rotated photo, but it can be rotated with exif or mediastore information. But in this case, exif and mediastore says orientation is 0, but the image is rotated. The most frustrating thing this comes totally randomly. The code is very simple:
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, currentFileUri);
startActivityForResult(intent, RequestCodeCollection.CAMERA_IMAGE_CAPTURE);
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
try {
oldImageExifInterface = new ExifInterface(currentFileUri.getPath());
}
}
Have anybody seen this problem? I experienced on Galaxy Nexus after OS update (4.1.1)