dpa99c / cordova-custom-config

Cordova/Phonegap plugin to update platform configuration files based on preferences and config-file data defined in config.xml
318 stars 84 forks source link

Android: custom-preference isn't doing anything, no error given #156

Closed distinctdan closed 5 years ago

distinctdan commented 5 years ago

I'm submitting a ... (check one with "x"):

Bug report

Hi, I'm trying to use custom-preference to set my app's orientation, but it's not having any effect on my AndroidManifest.xml. Here is the relevant chunk from my config.xml:

<platform name="android">
    <custom-preference name="android-manifest/application/activity[@android:name='MainActivity']/@android:screenOrientation"
                       value="landscape" />
</platform>

Is there a way to debug why it's not working?

Environment information

Android build issue:

distinctdan commented 5 years ago

Sooo, turns out I'm an idiot here. I was rereading my issue, and realized custom-config wasn't listed in my plugins list. In all my fiddling, I must have removed it at some point and forgot to re-add it. Works perfectly now!