Problems with "orientation" in config.xml

0 favourites
  • 4 posts
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • I fear this doesn't work for me...

  • Why would you want to lock a landscape game in portrait mode?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)