Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3792 in a recent build.
  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    9
    Vote Rating
    1
    Amaya is on a distinguished road

      0  

    Default Packaging a Android native app doesnt respect orientation setting from packager.json

    Packaging a Android native app doesnt respect orientation setting from packager.json


    Sencha cmd version tested:
    • 3.0.0.250
    Device tested
    • Samsung Galaxy sII with Android 2.3.4
    • HTC Desiré with Android 2.2
    Description:
    • Android manifest is not properly generated, since it doesn´t include orientation options described in packager.json.
    Steps to reproduce the problem:
    • Add this line in packager.json: "orientations": ["portrait"]
    • Get the apk running 'sencha app build native' or 'sencha package build packager.json'
    The result that was expected:
    • Android manifest includes the screenOrientation and the app run only in portrait mode
    The result that occurs instead:
    • Android manifest doesn´t change and the app switch to landscape mode

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,063
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    9
    Vote Rating
    1
    Amaya is on a distinguished road

      0  

    Default


    Is there a workaround? Can I change the generated android manifest in any way?

  4. #4
    Sencha User Ola GP's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    28
    Vote Rating
    2
    Ola GP is on a distinguished road

      0  

    Default


    I would also like to know a workaround for this.

  5. #5
    Sencha User Ola GP's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    28
    Vote Rating
    2
    Ola GP is on a distinguished road

      0  

    Default


    Just found out how to fix this until an official bug fix is out:

    Locate the file: AndroidManifest.xml in the Sencha Cmd folder.
    Add the following line to force the application in portrait mode:
    Code:
    android:screenOrientation="portrait"
    The line should be inside the activity-tag:
    Code:
    <activity android:name=".STActivity"
    			android:theme="@android:style/Theme.NoTitleBar"
    			android:screenOrientation="portrait"