How does one disable Sensor Autorotation and have the device respect the user’s desired orientation? Currently my app autorotates and disregards the user rotation preference/lock. I’ve tried editing the AndroidManifest.xml using custom templates and it doesn’t seem to affect the autorotation. In fact, it doesn’t seem to do anything. I’ve tried all values. Right now I temporarily set it to portrait and it still rotates. This is what I have:
project.xml
<template if="android" path="templates/android/AndroidManifest.xml" rename="app/src/main/AndroidManifest.xml" />
AndroidManifest.xml
<activity android:name="MainActivity" android:launchMode="singleTask" android:label="Test" android:configChanges="keyboardHidden|orientation|screenSize|screenLayout" android:screenOrientation="portrait">
I checked the generated AndroidManifest and it seems to be copying my custom template as is. Also, I’m getting mixed results from my AndroidManifest. For example, changing the app version number in the Manifest directly doesn’t change anything, and it still follows the value in the project.xml. But changing application android:label for example works. What could I be doing incorrectly?