I want to cancel auto rotation of views in my app. There are a lot of posts targeting this topic[1], all of them suggesting things like setting
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
or
<activity android:name=".myActivity"
android:screenOrientation="portrait">
which does exactly what I need, but prevents onConfigurationChanged() from firing, meaning that I am not able to track the orientation of the phone any longer. The thing is: I need to know about the orientation at some point.
Any ideas how I could get the orientation of the phone without enabling rotation of views?