This morning I came up with a problem trying to handle the onConfigurationChanged event. The problem is that the method, which I override, is not getting called when I change the orientation of the phone. Not getting called at all.
I’ve put android:configChanges="orientation" on the activity defined in the manifest as mentioned on the android documentation, but this don’t make a difference.
Have you come up with this problem?
The problem was that if you use this method
to force the orientation of your
Activityto portrait mode, you’re not candidate to receiveorientationchanges.So the solution is to not
setRequestOrientationto a particular mode. But instead useSCREEN_ORIENTATION_SENSOR.