How to prevent a Phonegap application to switch to landscape view

DMEM picture DMEM · May 15, 2014 · Viewed 12.9k times · Source

This one should be very simple, however it's not. I'm trying to prevent my application from going into landscape view so I've changed the config.xml file like this: <preference name="orientation" value="portrait" />. Unfortunately, it's not working. Any ideas?

Answer

DMEM picture DMEM · May 17, 2014

Ok, so I got it: The reason Phonegap ignored the <preference name="orientation" value="portrait" /> in the config.xml file is because my app was in debug mode. once I created a release version it stopped from going to landscape.