I have a camera app in portrait mode which takes pictures from both front and back end cameras.The issue is like the captured images are rotated in a wrong way...
For pr
You can use this to get orientation from a Uri
String filePath = mImageUri.getPath();
if (filePath != null) {
rotation = -1;
ExifInterface exif = new ExifInterface(filePath); // Since
// API
// Level
// 5
rotation = Integer.parseInt(exif.getAttribute(ExifInterface.TAG_ORIENTATION));
// //Log.v("roation",
// exif.getAttribute(ExifInterface.TAG_ORIENTATION));
}
}
} catch (Exception e) {
Toast.makeText(getApplicationContext(), "Internal error", Toast.LENGTH_LONG).show();
Log.e(e.getClass().getName(), e.getMessage(), e);
}
And as note rotation '3 = 180, 6 = 90, 8 = 270'