cordova/android- Locking screen orientation to “portrait or landscape”


Update the config.xml File which is in your project folder, above www.

Add the line:-

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

Then build and run your project & there will be no Orientation Change.

In place of “portrait” you can use “landscape”.

Leave a comment