Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova ignores screen orientation lock [duplicate]

I'm using Cordova 3.3.0 with my Galaxy S3 (running latest Cyanogenmod) to test an app I'm working on; I need the app screen to remain in "portrait" mode and be locked even if the user rotates the device. No matter what I tried or tutorials I followed, the app is ignoring the preferences to lock the screen. What am I doing wrong?

Here's my config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.numediaweb.test" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Test</name>
    <description>
        Test.</description>
    <author href="http://test.com" email="[email protected]">
        me
    </author>
    <content src="index.html" />
    <access origin="*" />
    <preference name="orientation" value="portrait" />
    <preference name="fullscreen" value="true" />
    <preference name="SplashScreen" value="splash" />
    <preference name="SplashScreenDelay" value="3000" />
</widget>
like image 677
numediaweb Avatar asked Jan 19 '14 01:01

numediaweb


1 Answers

Fixed in Cordova 3.4.1. Now preference orientation works!

<preference name="orientation" value="portrait" />
like image 58
Juan R Avatar answered Sep 23 '22 02:09

Juan R