I hope this question isn't marked as duplicate, but I can't find the right answer base on other questions.
I am looking for the best way to solve the orientation of camera image that can work for all devices. I tried many ways, but all of them don't work as aspect for all devices (I tested on HTC M7, Sony Experia, Samsung Galaxy and Nexus series ...).
Here are some approaches that I tried:
Camera orientation issue in Android
Android camera , onPictureTaken(byte[] imgData, Camera camera) method & PictureCallback never called
Android image orientation issue with custom camera activity
Image saved with wrong orientation
I even tried this library but seems it can't work for all cases. And all approaches above can work for many devices, but not all (sometimes I getting failed cases (not always) on Nexus 4, Nexus 5 and Samsung Galaxy S4)
Is there a all-in-one solution to solve this problem? I can see some camera apps like Camera360, A better camera... that work very well. How can they do this?