Problems with "orientation" in config.xml

Get help using Construct 2

Post » Tue Sep 30, 2014 12:16 pm

Hi all!

I am currently developing an application for Android with HTML 5 and Phonegap. This App should be locked to the "Portrait" orientation. In this application I also want to include a selfmade "runner" Contruct 2 game (which should be locked into "Landscape" orientation).

Here is my problem:

If i set <preference name="orientation" value="portrait" /> in my config.xml (which is needed for phonegap) the Construct html-file is also locked to the "Portrait mode" and my game is shown in "portrait" mode...
If I set the orientation into "landscape" in the config.xml file my application is also set to "landscape" mode and my app looks horrible.
If the orientation is set to "default" my application also looks horrible if i activate the "switch" command at the device.
Another problem is that the config.xml orientation overwrites all my commands in the html 5 documents...

My Question:

How can I manage that my Android application is set to "Portait" while my Construct 2 game which is included in the app is set to "landscape" mode?

Thanks for your help,
kind regards Davsmond
Posts: 2
Reputation: 204

Post » Tue Sep 30, 2014 2:57 pm

Maybe you can use the System -> "Is on platform" and check if its on "Android" or not and then switch it based on that. I have never used it my self as I only created stuff for desktops, so if it can solve it I don't know its just a guess :D
Posts: 1,209
Reputation: 7,537

Post » Fri Oct 03, 2014 6:18 am

I fear this doesn't work for me...
Posts: 2
Reputation: 204

Post » Fri Oct 03, 2014 1:06 pm

Why would you want to lock a landscape game in portrait mode?
Scirra Founder
Posts: 24,910
Reputation: 198,648

Return to How do I....?

Who is online

Users browsing this forum: tarek2, Yahoo [Bot] and 7 guests