I decided to open new question because none of those that are already posted, has a good answer.
I need to update AndroidManifest.xml "from plugin.xml", so that the <application>
tag has the following property, alongside those it already has:
android:name="mypackage"
How can do that?
Thank you
I had the same issue, and I used a Cordova hook to do the work.
First, edit your
config.xml
file to add the hook:Create a file called
scripts/android_app_name.js
(set it executable), and inside, just use a search/replace function. It should look like:The simplest and the latest(cordova version 8.1.2) way to do it to use
edit-config
tag like below.In similar way you can edit other configurations as well.
Hope it will be helpful!
I think I had the same problem as you. I found this in the cordova documentation.
https://cordova.apache.org/docs/en/4.0.0/plugin_ref_spec.md.html
If you search the title "config-file Element" you will find an example:
Indeed, as jlreymendez mentioned, the right way is this:
Also note that modifications will revert if you remove the plugin, what will not happen with the hook trick.