Android
DeveloperHow to use Android sensors to detect orientation changes
If you follow the official Android documentation for handling orientation changes via the manifest, you'll run into sort of a chicken and egg problem. Here's the solution you need.