Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap: gap:config-file Not working on config.xml

I am trying to use the element "gap:config-file" on the config.xml of my Phonegap project to modify some elements of the generated AndroidManifest.xml, but it is not working.

I am adding this to my config.xml:

<gap:config-file platform="android" parent="/manifest">
    <supports-screens
    android:xlargeScreens="false"
    android:largeScreens="false"
    android:smallScreens="false" />
</gap:config-file>

Then i do a

phonegap build android

Everything is succesfull, but when i open the AndroidManifest.xml, there is no changes, still appears the old values:

<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />

I have been trying for hours, but i can't make this work.

Any idea?

Thanks! Gustavo

like image 219
OverMind Avatar asked Sep 08 '14 11:09

OverMind


1 Answers

This is a feature for Phonegap Build only. The feature is documented here: http://phonegap.com/blog/2014/01/30/customizing-your-android-manifest-and-ios-property-list-on-phonegap-build/

Locally you could create a custom plugin and specify the overrides for the manifest there. The other option is to directly edit the AndroidManifest.xml and add the desired options there. These changes will not be overridden during the build process.

like image 95
bjunix Avatar answered Nov 09 '22 20:11

bjunix