How do I lock orientation in Intel XDK ?

Get help using Construct 2

Post » Thu Aug 13, 2015 9:03 am

My app keeps on using portrait even when I have chosen Landscape in the build settings.

The answer seems to be here:
Cordova Screen Orientation Plugin
https://github.com/gbenvenuti/cordova-p ... rientation

But how do I integrate this into Construct 2 ?

Thanks.
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Sat Oct 03, 2015 9:22 pm

same problem here...

how to lock orientation?
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Mon Dec 07, 2015 12:26 pm

@Toddler @Toddler

You have to add this plugin to your XDK project and then open index.html in XDK and put this code below the closing head tag:
Code: Select all
<script>
   screen.lockOrientation("landscape");
</script>


It did work for Android only though. For ios I had to use phonegap cli + xcode without any plugins. It locked and worked correctly.
B
7
S
2
Posts: 68
Reputation: 645


Return to How do I....?

Who is online

Users browsing this forum: mindragon73, nahima and 26 guests