0

I'm using a cordova cloud compiler, and I'm required to add a <uses-permission> configuration targetting android manifest xml file. So, is there any way to edit <uses-permission> of android manifest directly from cordova config files?

Any help will be much appreciated.

Thank you

user6039980
  • 3,108
  • 8
  • 31
  • 57

1 Answers1

1

There is indeed a readymade plugin available in cordova that suits your requirement. This custom config plugin lets you update platform configuration files based on custom preferences and config-file data defined in config.xml that are not supported out-of-the-box by Cordova/Phonegap.

Request you to check out this custom-config-plugin which lets you update the uses-permission too in AndroidManifest.xml using config.xml file changes. Do check out the example config.xml file in the link which should help. Cheers.

Gandhi
  • 11,875
  • 4
  • 39
  • 63
  • Thank you, but my problem is still not solved. I tried installing the plugin, and then adding ` ` under ``, but after compiling, I found that the setting failed to solve the same problem as here http://stackoverflow.com/questions/25068907/http-seller-samsungapps-com-choosing-a-category, that I was having. – user6039980 May 31 '16 at 18:59
  • I don't know, I'm using a Cordova Cloud Compiler (Cocoon.io). – user6039980 May 31 '16 at 19:03
  • @user6039980 so you will not be able to get the apk as well? – Gandhi May 31 '16 at 19:05
  • No, the compilation completed successfully, but after sending the app to samsungapps I have been still facing the same problem as in the link above. – user6039980 May 31 '16 at 19:09
  • @user6039980 But without validating manifest XML we can't segregate whether it is the problem with XML setting or setting not impacting in the device. – Gandhi May 31 '16 at 19:12
  • Is it possible to generate the manifest xml file using only cordova cli, and without installing android ide? – user6039980 May 31 '16 at 19:23
  • @user6039980 very much possible. Just execute Cordova platform add android command and then execute Cordova build android command.It will create manifest XML file in platforms/android folder – Gandhi May 31 '16 at 19:27
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/113449/discussion-between-user6039980-and-gandhi). – user6039980 May 31 '16 at 19:34
  • I solved my problem via switching to Monaca.io: it has good IDE integration for Android: so that I found there the Androidmanifest.xml and edited it. Anyway, thank you for your help. – user6039980 Jun 01 '16 at 00:09
  • @user6039980 Glad you cracked it. Cheers – Gandhi Jun 01 '16 at 04:56