android中的phonegap构build权限

我正在使用phonegap构build来创build我的应用程序。

有没有一种方法可以configurationandroid所要求的权限?

现在它要求所有的权限,当我实际上只需要internet,localstorage和通知。

请记住 – 我只使用phonegap build,而不是CLI而不是Cordova。 我没有AndroidManifest.xml只有config.xml

任何人都可以帮忙吗?

谢谢。

编辑:

这是由SvenT23回答的。

我们都意识到,phonegap已经从他们目前的文档中删除了这个答案,只留在旧的文档。

为了将来的参考,我将从phonegap添加指令,以防将来被删除。

APIfunction

目前通过此接口支持的function名称如下:

http://api.phonegap.com/1.0/battery
//映射到android:BROADCAST_STICKY权限

http://api.phonegap.com/1.0/camera
//映射到android:CAMERA,winphone:ID_CAP_ISV_CAMERA和winphone:ID_HW_FRONTCAMERA权限

http://api.phonegap.com/1.0/contacts
//映射到android:READ_CONTACTS,android:WRITE_CONTACTS,android:GET_ACCOUNTS和winphone:ID_CAP_CONTACTS权限

http://api.phonegap.com/1.0/file
//映射到WRITE_EXTERNAL_STORAGE权限

http://api.phonegap.com/1.0/geolocation
//映射到android:ACCESS_COARSE_LOCATION,android:ACCESS_FINE_LOCATION,android:ACCESS_LOCATION_EXTRA_COMMANDS和winphone:ID_CAP_LOCATION权限

http://api.phonegap.com/1.0/media
//映射到android:RECORD_AUDIO,android:RECORD_VIDEO,android:MODIFY_AUDIO_SETTINGS和winphone:ID_CAP_MICROPHONE权限

http://api.phonegap.com/1.0/network
//映射到android:ACCESS_NETWORK_STATE和winphone:ID_CAP_NETWORKING权限

http://api.phonegap.com/1.0/notification
//映射到VIBRATE权限

http://api.phonegap.com/1.0/device
//映射到winphone:ID_CAP_IDENTITY_DEVICE权限

用法示例

<?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" id = "com.phonegap.example" versionCode = "10" version = "1.0.0" > <!-- versionCode is optional and Android only --> <name>PhoneGap Example</name> <description> An example for phonegap build docs. </description> <author href="https://build.phonegap.com" email="support@phonegap.com"> Hardeep Shoker </author> <!-- 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"/> <!-- to enable individual permissions use the following examples --> <feature name="http://api.phonegap.com/1.0/battery"/> <feature name="http://api.phonegap.com/1.0/camera"/> <feature name="http://api.phonegap.com/1.0/contacts"/> <feature name="http://api.phonegap.com/1.0/file"/> <feature name="http://api.phonegap.com/1.0/geolocation"/> <feature name="http://api.phonegap.com/1.0/media"/> <feature name="http://api.phonegap.com/1.0/network"/> <feature name="http://api.phonegap.com/1.0/notification"/> </widget> 

Solutions Collecting From Web of "android中的phonegap构build权限"