I have that in mu config.xml
<preference name="Orientation" value="landscape"/>
However applicatoin starts as portrait and I can rotate my screen.
How can I force landscape ?
I read that: Force “Landscape” orientation mode
does not trigger event :
document.addEventListener("orientationchange", function(event){
switch(window.orientation)
{
case -90: case 90:
/* Device is in landscape mode */
break;
default:
/* Device is in portrait mode */
}
});
No effect neither:
<link rel="manifest" href="manifest.json">
Nor this one:
screen.orientation.lock('landscape');
How can I force the portrait mode ?
Here is the
indelxdk.config.crossawalk.app.xml
<?xml version='1.0' encoding='UTF-8'?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:intelxdk="http://xdk.intel.com/ns/v1" id="com.intel.appx.sitechat3.xwalk15" version="0.0.1" android-versionCode="1">
<!--This file is generated by the Intel XDK. Do not edit this file as your edits will be lost. -->
<!--To change the contents of this file, see the documentation on the intelxdk.config.additions.xml file.-->
<intelxdk:version value="1.0"/>
<intelxdk:cordova-cli version="4.1.2"/>
<name>AP Debug x15 sitechat3</name>
<description>Universal init code for Intel XDK and Cordova device ready detection, as well as within browser.</description>
<author>Intel XDK</author>
<content src="index.html"/>
<access origin="*"/>
<access origin="https:*"/>
<intelxdk:plugin intelxdk:name="StatusBar" intelxdk:value="cordova-plugin-statusbar" intelxdk:version="1.0.0" intelxdk:checksum="b4e7aac6" intelxdk:type="file"/>
<intelxdk:plugin intelxdk:name="Device" intelxdk:value="cordova-plugin-device" intelxdk:version="1.0.1" intelxdk:checksum="adfc61ba" intelxdk:type="file"/>
<intelxdk:plugin intelxdk:name="Splashscreen" intelxdk:value="cordova-plugin-splashscreen" intelxdk:version="2.1.0" intelxdk:checksum="170efb68" intelxdk:type="file"/>
<preference name="android-minSdkVersion" value="14"/>
<preference name="android-targetSdkVersion" value="19"/>
<preference name="android-installLocation" value="auto"/>
<preference name="Fullscreen" value="true"/>
<preference name="Orientation" value="landscape"/>
<intelxdk:crosswalk version="15"/>
<!--creationInfo:{"src":"jsapp/template-blank-cordova-project-lite/sample.zip","projectTypeName":"com.intel.xdk.projecttype.jsapp"}-->
<preference name="debuggable" value="false"/>
<platform name="ios">
<!-- below requires the splash screen plugin -->
<!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
<preference name="AutoHideSplashScreen" value="false"/>
<preference name="FadeSplashScreen" value="false"/>
<preference name="FadeSplashScreenDuration" value="2"/>
<preference name="ShowSplashScreenSpinner" value="false"/>
<!-- below requires the status bar plugin -->
<!-- docs: https://github.com/apache/cordova-plugin-statusbar -->
<!-- see http://devgirl.org/2014/07/31/phonegap-developers-guid -->
<preference name="StatusBarOverlaysWebView" value="false"/>
<preference name="StatusBarBackgroundColor" value="#000000"/>
<preference name="StatusBarStyle" value="lightcontent"/>
</platform>
<platform name="android">
<!-- below requires the splash screen plugin -->
<!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
<preference name="SplashMaintainAspectRatio" value="false"/>
</platform>
<intelxdk:crosswalk xmlns:intelxdk="http://xdk.intel.com/ns/v1" xwalk-command-line="--disable-pull-to-refresh-effect"/>
<intelxdk:crosswalk xmlns:intelxdk="http://xdk.intel.com/ns/v1" xwalk-command-line="--ignore-gpu-blacklist"/></widget>