It seems PhoneGap generates that file automatically when config.xml
is modified.
I wish to add Ad network's activities, services, etc in AndroidManifest.xml
but I can't find the correct way to edit that file.
You can edit the XML manually by clicking on the AndroidManifest. xml tab. Android manifest files generally include a single <manifest> tag with a single <application> tag.
Every app project must have an AndroidManifest. xml file (with precisely that name) at the root of the project source set. The manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play.
The root element of the AndroidManifest. xml file. It must contain an <application> element and specify xmlns:android and package attributes. Defines the Android namespace.
Phonegap uses config.xml to create androidmanifest.xml when you add the android platform to a project. It is also modified when you add plugins and build the project (for example, it adds the required permission for the plugin).
But you can also manually edit the file in platforms/android/AndroidManifest.xml
to add permissions, configure the activity or the application... it will not be lost when you rebuild your project.
Typically this is found in the "res" directory ( - src - gen [Generated Java Files] - Android - Android Dependencies - Referenced Libraries - assets - bin - libs - res - AndroidManifest.xml - proguard-project.txt - project.properties) of course this is depending on what version of Cordova you are using. Typically most of these things are specified in the config.xml for newer Phonegap builds from my understanding which is why you don't need to include an AndroidManifest.xml file when using Phonegap Build. I would recommend trying Configap to edit the main config.xml and see if any of the settings/services you need to access are options. Configap can be found here!
forgot to mention I use Notepad++ to edit my .xml on the fly but you can also open in the sdk
You probably want to check out cordova-custom-config.
It supports many extra settings in the cordova config.xml
to customise the AndroidManifest.xml
.
I'm using it to change the android:configChanges
setting (adding uiMode
to stop it from reloading when docking/undocking) and it works great.
The cordova-custom-config github page shows a full example with all supported options so it's very easy to setup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With