问题
I tried other solutions around here but no matter what I do the same permissions are asked during install of my app. I tried removing a bunch of the "plugins" phonegap uses, namely: (from the config.xml)
<gap:plugin name="org.apache.cordova.battery-status"/>
<gap:plugin name="org.apache.cordova.camera"/>
<gap:plugin name="org.apache.cordova.media-capture"/>
<gap:plugin name="org.apache.cordova.contacts"/>
<gap:plugin name="org.apache.cordova.geolocation"/>
<gap:plugin name="org.apache.cordova.globalization"/>
Yet when I update my code and then try to install the apps it still asks for stuff like location.
Anyone who knows this?
回答1:
It isn't the plugins that declare the permissions. The permissions are declared with feature elements like
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/device"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/network"/>
来源:https://stackoverflow.com/questions/27876730/how-to-set-permissions-for-android-using-phonegap-build