I have a video player in which I have two features:
If the auto-rotate is disabled and when the user clicks on fullscreen button I force the
orientationto go inlandscapeview usingsetRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)and back to portrait view when fullscreen is exited.I have overridden the
onConfigurationChangedto detect the change in orientation when the auto-rotate feature is enabled by user and change the activity view according to the orientation.
Now the problem with this setup is that if user start the activity and goes in fullscreen and setRequestedOrientation get invoked once, later when auto-rotate is enabled, the activity doesn't receive the orientation changes and the onConfigurationChanged doesn't get called.
I read here (https://stackoverflow.com/a/6109206/5167868) that they wont work simultaneously.
I would like to know if there a way of implementing both as I have seen players like MX Player do this in their app.