Search code examples
cordovacordova-plugins

cordova plugin - meta-data in plugin.xml need to change for different project


I am trying to develop a Cordova plugin,which need to add a meta-data to android manifest.xml.

<config-file target="AndroidManifest.xml" parent="/manifest/application">

  <meta-data
    android:name="key"
    android:value="XXXXXXXXXXXXXXXX" />
</config-file>

For anyone who will use this plugin, the key will be different. so if they want to use this plugin, they need to revise plugin.xml. As you know, this is the source code of plugin, a plugin user may never want to revise. So is there any other place, where I can make this configurable?


Solution

  • use this plugin,I solve the issue https://github.com/mircoc/cordova-plugin-settings-hook