Reputation: 496
I have made a simple tic tac toe app for Android which needs no permissions to access the camera, or browser etc.
What do i put in the PhoneGap config.xml file to specific this? As at the moment when you install it, it says the app can access everything, and i dont want this to show as it is not true.
Upvotes: 1
Views: 3686
Reputation: 7904
Nick Roths solution will usually do the trick, BUT... make sure that you did not install any unnecessary Phonegap Plugins. If you did, then setting "preferences" to "none" will have no effect.
I tried Nicks solution, but I still got a giant list of access permissions in my Android Manifest (which would presumably be presented to the user once I actually publish).
The reason is I misunderstood the way the Phonegap Plugins work. I needed the Device, Notification and Network plugins for my app, and I found this page describing how to install them.
I assumed wrongly that these plugins would be installed as part of the Phonegap SDK on my local machine, and be available to all apps. So I decided to go ahead and install all these plugins once and for all.
Silly me. I understood wrongly. When you install a plugin as described on the above link, it will install that functionality for your current app only. this is why you need to call it from the directory where the app is located.
Obviously it would make no sense if the app then didn't have the user permissions for these functionalities, so PhoneGap adds them automatically to AndroidManifest, even if you set the "permissions" preference to "none".
So: uninstall the plugins that relate to the user permissions you don't need. This is the section from the above page that describes how:
To remove a plugin, refer to it by the same identifier that appears in the listing, which corresponds to subdirectories within the project's plugins directory. For example, here is how you would remove support for a debug console from a final release version:
$ phonegap local plugin remove org.apache.cordova.core.console
Upvotes: 1
Reputation: 3077
Referenced from here https://build.phonegap.com/docs/config-xml
<!-- If you do not want any permissions to be added to your app, add the
following tag to your config.xml; you will still have the INTERNET
permission on your app, which PhoneGap requires. -->
<preference name="permissions" value="none"/>
If its still giving you problems try here
http://community.phonegap.com/nitobi/topics/config_xml_disable_all_permissions_not_working_android
Upvotes: 3