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
the selected answer just gives the the possible rotation that may have been saved in EXIF header. in several cases camera doesn't set "ExifInterface.TAG_ORIENTATION" attribute in EXIFHeader so it will be 0(ExifInterface.ORIENTATION_UNDEFINED). and event if it is set it will be true in only one case/orientation when the picture is taken. you have to manually set rotation in camera parameters using setRotation() method. the documentation of setRotation() is very clear and also explains how to calculate rotation with consideration of device rotation and camera sensor orientation(usually landscape).
so check out setRotation() method . thats what you need to change.