I\'am opening camera app on click of a button. And displaying the captured photo in next activity. But the captured photo is rotating by 90 degrees. When I display the image
you can just simpaly rotate it
get the orietation of the image taken using this code in onActvityresult ....
File imageFile = new File(imageUri.toString());
ExifInterface exif = new ExifInterface(imageFile.getAbsolutePath());
int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
int rotate = 0;
switch(orientation) {
case ORIENTATION_ROTATE_270:
rotate-=90;break;
case ORIENTATION_ROTATE_180:
rotate-=90;break
case ORIENTATION_ROTATE_90:
rotate-=90;break
}