Note that there are some explanatory texts on larger screens.

plurals
  1. POAdobe AIR Android launching in landscape doesn't work
    primarykey
    data
    text
    <p>The app i am developing should be displayed only in landscape mode.</p> <p>In my app descriptor i have</p> <pre><code> &lt;aspectRatio&gt;landscape&lt;/aspectRatio&gt; &lt;autoOrients&gt;false&lt;/autoOrients&gt; </code></pre> <p>On iOS devices app is launched in landscape mode and everything works as expected.</p> <p>But when i tried to deploy on my android device ( Samsung galaxy S3 ), the app is launched in portrait mode.</p> <p>When I modify the descriptor file to read :</p> <pre><code> &lt;aspectRatio&gt;landscape&lt;/aspectRatio&gt; &lt;autoOrients&gt;true&lt;/autoOrients&gt; </code></pre> <p>then the app will be changing orientation.</p> <p>While debugging i found out that the apps orientation when starting is stage.orientation == "default"</p> <p>Also i have added <code>android:screenOrientation="landscape"</code> to android specific configurations in my app.xml (the app descriptor file):</p> <pre><code>&lt;android&gt; &lt;manifestAdditions&gt; &lt;![CDATA[ &lt;manifest android:installLocation="auto"&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt; &lt;uses-permission android:name="android.permission.READ_PHONE_STATE"/&gt; &lt;uses-permission android:name="android.permission.VIBRATE"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt; &lt;uses-permission android:name="android.permission.DISABLE_KEYGUARD"/&gt; &lt;uses-permission android:name="android.permission.WAKE_LOCK"/&gt; &lt;uses-permission android:name="android.permission.CAMERA"/&gt; &lt;uses-permission android:name="android.permission.RECORD_AUDIO"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/&gt; &lt;uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/&gt; &lt;application android:enabled="true"&gt; &lt;activity android:excludeFromRecents="false" android:screenOrientation="landscape"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN"/&gt; &lt;category android:name="android.intent.category.LAUNCHER"/&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; ]]&gt; &lt;/manifestAdditions&gt; &lt;!--Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after --&gt; &lt;!--&lt;colorDepth&gt;&lt;/colorDepth&gt;--&gt; &lt;/android&gt; </code></pre> <p>Is this a known issue? What could be the cause of this?</p> <p>EDIT:</p> <p>I ended up using <code>stage.setAspectRatio( StageAspectRatio.LANDSCAPE );</code> in my main class. It will work even with devices that have default orientation other than PORTRAIT</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload