Landscape orientation works in one side only


#1

in config.xm I set:

After this, applications runs in landscape only, but in one side only! It means if I turn the tablet at 180°, the application does not rotate for beeing visible in the “other landscape”.

Note: I’m using Android 4.4
Note: other apps (like google play store) work well (so it’s not related to OS settings)

Here is the full config.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.myapp" version="2.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>My app name</name>
  <description>
        desc
    </description>
  <content src="index.html"/>
  <access origin="*"/>
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="BackupWebStorage" value="none"/>
  <preference name="orientation" value="landscape"/>
  <feature name="StatusBar">
    <param name="ios-package" value="CDVStatusBar" onload="true"/>
  </feature>
  <platform name="android">
    <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
    <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
    <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
    <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
    <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
  </platform>
  <icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
</widget>

Any idea?


#2

Though not a direct answer to your question you can use a different approach. Insead of doing manual changes to config.xml you can use all around solution with Cordova plugin called: Cordova Screen Orientation Plugin

Using iot you can lock device orientation programmatically. And it supports full landscape mode, the orientation is either landscape-primary or landscape-secondary (sensor).

Read more about it here: http://www.gajotres.net/changing-locking-screen-orientation-in-ionic-application/

If you still want to do it via config.xml then please post it in your queestion. It’s hard to do anything if we can’t see what have you done so far.


#3

Thanks for this.

If possible, I’d like to avoid doing this programatically (because I don’t need it, and because of possible version compatibility issues).

I updates my question with full config.xml, even not sure It will help. Thanks again.