How do I The screen rotation in android

0 favourites
  • 11 posts
From the Asset Store
Is a circular loading screen with code ready to use. No Animation.
  • Hi,

    I have a problem, my game is in landscape, but when i rotate in android the phone, the game don't rotate, i haven't the lock screen in any event sheet.

    How can i do this for the good function?, becouse i need when users rotate the phone the game also rotate, but i can't do it of any method.

    I compile with cocoon.io, the project settings is set in landscape by default in construct 2, in cocoon.io i only set the rotation in "default"

    Thanks so much

  • Have you checked the Project Properties?

  • Hi,

    The orientation is in landscape.

    How can i do always be in landscape?, becouse if i put in ANY the orientation, will be portrait also?

    If i put on start of layout lock to landscape, will rotate the screen or will not rotate when you change the orientation of the device?.

    Thanks and regards

  • I don't have any experience with cocoon.io, does it allow you to make changes to the AndroidManifest.xml?

    You can define available screen orientations in that file.

    https://developer.android.com/guide/top ... ement.html

  • i have de config.xml, please can you help me what need change:

    <?xml version="1.0" encoding="UTF-8"?>

    <widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="com.xxx.xxx" version="1.0">

    <name>XXXGAME</name>

    <description>XXXGAME</description>

    <author email="XXX">Fernando</author>

    <icon src="icon-128.png" width="128" height="128"/>

    <icon src="icon-256.png" width="256" height="256" gap:role="default"/>

    <preference name="permissions" value="none"/>

    <preference name="android-targetSdkVersion" value="21"/>

    <feature name="http://api.phonegap.com/1.0/network"/>

    <preference name="orientation" value="landscape"/>

    <preference name="fullscreen" value="true"/>

    <gap:config-file platform="ios" parent="UIStatusBarHidden">

    <true/>

    </gap:config-file>

    <gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance">

    <false/>

    </gap:config-file>

    <preference name="deployment-target" value="8.0"/>

    <preference name="android-minSdkVersion" value="16"/>

    <plugin name="cordova-plugin-crosswalk-webview" source="npm"/>

    <plugin name="cordova-plugin-wkwebview-engine"/>

    <plugin name="cordova-plugin-file"/>

    <plugin name="cordova-plugin-httpd"/>

    <plugin name="cordova-plugin-whitelist" source="npm"/>

    <access origin="*"/>

    <plugin name="cordova-plugin-inappbrowser" source="npm"/>

    <!-- Optional splash screen image, e.g.: -->

    <!-- <gap:splash src="splash.png" width="1024" height="768" />

    -->

    <platform name="android">

    <preference name="enabled" value="true"/>

    </platform>

    <plugin name="com.ludei.webviewplus.ios" spec="*"/>

    <plugin name="com.ludei.webviewplus.android" spec="*"/>

    <preference name="Orientation" value="landscape"/>

    <preference name="Fullscreen" value="true"/>

    <plugin name="cocoon-plugin-application-android" spec="*"/>

    <preference name="CocoonSplashScaleMode" value="scaleAspectFit"/>

    <plugin name="https://github.com/appodeal/appodeal-cordova-plugin.git" spec="https://github.com/appodeal/appodeal-cordova-plugin.git"/>

    </widget>

    Thanks and regards.

  • You can try changing the Orientation preference value to "sensorLandscape" or "sensor".

    But there is no guarantee that this will work.

  • Hi,

    My friend, it's ok, now y can rotate landscape.

    Thanks so much.

  • Could you tell what did you do?

  • I set sensorLandscape in the orientation

  • I've tried a lot to get on your topic, could specify a little better how it solved this problem, I also have a project that needs to stay in landscape but I would like to let the user choose which side of the landscape he wants to use, I made the change in '' config. xml '' put sensorLandscape in the orientation but did not work, did you use Construct 3?

    How did you set the orientation in the project settings?

    Thank you very much if you can help me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I found a solution through what I read here in the topic, changing the orientation in the config.xml file had no effect so I made the same change in the config.json file and it worked.

    It was difficult to find the solution to this problem, very good topic!

    thank you so much!

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