I'm developing an android camera api app that is locked in portrait mode in the manifest file.
android:configChanges="orientation"
android:screenOrientation="portrait"
My problem is, when I store pictures, they are all stored in the same orientation.
I would like them to be stored with the true orientation, eg. my ceiling should be at the top of the stored picture, no matter how I orient my phone, if that makes any sense
In order to do this I have to know the orientation of the device, however it seems that when the app is locked inn portrait, all getOrientation'ish methods thinks my phone is in portrait mode, no matter the physical orientation of my phone.
Here are the ones I've tried:
Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
Camera.getCameraInfo(mCurrentlyUsedCamera,cameraInfo);
Log.e("debug","orientation:"+cameraInfo.orientation);
and
getResources().getConfiguration().orientation
and
this.getWindowManager().getDefaultDisplay().getRotation()
.
Any way of getting the true orientation in a portrait locked app?
.