0

How to lock orientation in phonegap build to only portrait?

And if need to use plugin then please mention config.xml line for adding plugin so I can get more accurate answer.

Cœur
  • 37,241
  • 25
  • 195
  • 267
user3664164
  • 69
  • 1
  • 2
  • 4

1 Answers1

1

Use this line in your config.xml file

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

See more here: http://docs.build.phonegap.com/en_US/configuring_preferences.md.html#Preferences

The community support page is also a good place to find information: http://community.phonegap.com/nitobi

Forss
  • 778
  • 1
  • 4
  • 13
  • This is not working for android – Haider Jul 01 '15 at 06:21
  • @Haider It does, are you using Phonegap Build to build the app? It doesn't work if you're using the CLI. – Forss Jul 01 '15 at 07:45
  • I am using PhoneGap Desktop to create projects and using PhoneGap Developer App from play store to run the application. – Haider Jul 01 '15 at 08:29
  • @Haider My answer won't work then, it only works when using [phonegap build](https://build.phonegap.com) . – Forss Jul 01 '15 at 08:37