Android orientation in phonegap build?

74 views Asked by At

Is there anyway to declare this piece of code in config.xml (the android.manifest does not exist in phonegap build):

<activity
            android:name=".Activity.SplashScreenActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape">
            <intent-filter>
                <action
                    android:name="android.intent.action.MAIN" />
                <category
                    android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

I want to force landscape at all times in my app, and the other declarations dont seem to work...any thoughts?

2

There are 2 answers

0
AudioBubble On BEST ANSWER

@totothegreat, You may recall this from a previous post:

Lastly, if you want to implement this with config.xml, then I suggest you read the thread with Ben Jones' implementation. Best of luck, text me back, if you are still having problems.

Is there something that is not clear in this post? Something that needs explaining?

Jesse

3
AshBringer On

You have to add the following line in your config.xml :

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

Documentation