Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4724] Android ScreenRotation still works when turning it off natively

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2017-01-13T11:19:12.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, rotation
ReporterCreative
AssigneeShak Hossain
Created2017-01-12T13:42:44.000+0000
Updated2017-01-13T13:52:44.000+0000

Description

When I put "Automatic Rotation" off using the native functionality in Android (6.0.1), my Titanium app (currently on 6.0.1.GA, coincidentally) still allows rotating the screen when rotating the device. I cant find a specific option i need to set in Tiapp.xml or AndroidManifest.xml.

Comments

  1. Sharif AbuDarda 2017-01-12

    Hello, I am not clear about what you mean with "using the native functionality". Do you mean by disabling auto rotation in device? Cause, I tested a hello world project the app stays portrait mode with auto rotation off. The project build in SDK 6.0.1.GA and running on Android 6.0.1 device. See guide for limiting orientation in Android: http://docs.appcelerator.com/platform/latest/#!/guide/Orientation. Thanks.
  2. Hans Knöchel 2017-01-13

    You can specify it in the <android> section of your tiapp.xml:
           <android xmlns:android="http://schemas.android.com/apk/res/android">
               <manifest android:installLocation="preferExternal" android:versionCode="..." android:versionName="..." package="...">
                   <application android:screenOrientation="portrait">
                       ...
                   </application>
               </manifest>
           </android>
       
  3. Creative 2017-01-13

    Yes, my bad, I managed to fix it with some fiddling. I might follow this up with a new bugreport coming week, because it mightve been conflicting with a tss file for a object

JSON Source