I'm just learning how to work with phonegap, but I've run into a rather annoying problem.
I've tried adding some preferences (fullscreen and orientation) the config.xml, but neither seem to work. Here is the code:
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.example"
versionCode = "10"
version = "1.0.1" >
<!-- versionCode is optional and Android only -->
An example for phonegap build docs.
<preference name="orientation" value="portrait" />
<preference name="fullscreen" value="true" />
I've tested the app with an Android 4.2.2 and the Chrome Mobile device simulator.
How do I fix this? The app looks really weird in landscape mode.
Only when you build your app via PhoneGap will it read preferences from config.xml. Chrome will not do so. If you're using the PhoneGap Developer app, it also won't read config.xml. (You have to build either with PhoneGap Build or your local PhoneGap CLI)
Also, 4.2.2 is pretty old and doesn't support a lot of modern web features. Expect lots of odd glitches if you aren't writing CSS, HTML, and JS that it will understand. I would suggest targeting 5+ if you can.