When capturing a photo via the MediaStore.ACTION_IMAGE_CAPTURE intent, the preview displayed is in wrong orientation. This only happens on a few devices. Attached is the screenshot of how it looks. Photo was taken with the front cam on portrait. Our app already handles the orientation correction, so when user taps check, it is in the correct orientation. The problem is really just the preview.
Tried using
i.putExtra(MediaStore.EXTRA_SCREEN_ORIENTATION, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
, but it's not working. Is there any way to solve this? Or do I have to implement a custom camera?
EDIT: The preview i meant is the one shown after you capture a photo and before you select/finalize the photo you've captured. On our scenario (as shown on the screenshot attached, onActivityResult() is not yet called. Tapping the check button is what calls the onActivityResult() callback.