How to force landscape mode


When I add the following in the project’s “config.xml” file:

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

The result in file “platforms/android/AndroidManifest.xml” is:


Instead of:


Is there a way to get this value outthere somehow ?
If I change it manually and build - it’s really in landscape mode - but I don’t want to do that …
I’m using Cordova 3.4


Looks like a bug in 3.4.0:

I’d say these are your options:

  1. Remove the preference and just manually add it to the AndroidManifest
  2. Update Phonegap to 3.5.0
  3. Use a plugin instead:


mmm good to know :slight_smile: I actually have a newer version ( 3.5 ) installed, but I’m not sure how do I upgrade the current-old project ( 3.4 ) to use the new version, you have any idea ?

If not, I’ll do it manually.
Thanks in advance !


Upgrading can mostly be done from the CLI command line interface. These are for 3.3.0 to 3.4.0 but I don’t think any has changed and you can do the same to go to 3.5.0:

Depending on how many plugins or how much customization you have done determines how much updating of those you may need to do as well.

I’d just copy your 3.4.0 project so you have a backup and give it a shot.


Cordova on my server is already 3.5, I’ll explain my issue in new thread ( incase others have this issue as well )