config.xml 格式问题
我试图阻止 Android 应用程序请求大量权限,并且我正在使用 PhoneGap 进行开发。我在这里问了一个问题:
http://community.phonegap.com/nitobi/topics/change_android_permissions_none_required
我得到的建议是将此行添加到我的 config.xml 文件中:
<preference name="permissions" value="none"/>
我已经这样做了,但应用程序在安装时仍然请求 7 个权限。下面是我的 config.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = ""
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.sapps.reftorange"
version = "1.0.0">
<name>Test</name>
<gap:platforms>
<gap:platform name="android" minVersion="1.0" />
</gap:platforms>
<icon src="icon.png" gap:role="default" />
<preference name="permissions" value="none"/>
</widget>
我是否遗漏了什么,或者您认为我的问题出在其他地方?
编辑:第二行现在显示
<widget xmlns = "http://www.w3.org/ns/widgets"
该应用程序现在请求 3 个权限,即电话呼叫、网络和存储。我猜测该
<preference name="permissions" value="none"/>
标签实际上并没有删除所有权限请求。
I am trying to prevent an android application from requesting lots of pemissions and I am developing using phonegap. I asked a question here:
http://community.phonegap.com/nitobi/topics/change_android_permissions_none_required
The advice I was given was to add this line to my config.xml file:
<preference name="permissions" value="none"/>
I have done this but the app still requests 7 permissions at install. Below is my config.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = ""
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.sapps.reftorange"
version = "1.0.0">
<name>Test</name>
<gap:platforms>
<gap:platform name="android" minVersion="1.0" />
</gap:platforms>
<icon src="icon.png" gap:role="default" />
<preference name="permissions" value="none"/>
</widget>
Is there something I'm missing with this or do you think my problem lies elsewhere?
EDIT: Second line now reads
<widget xmlns = "http://www.w3.org/ns/widgets"
And the app now requests 3 permissons, these being phone calls, network and storage. It would be my guess that the
<preference name="permissions" value="none"/>
tag doesn't actually remove all permission requests.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过更改上面的行,虽然从phonegap下载并安装仍然需要3个权限,但上传到android市场然后下载到设备只需要互联网,这就是目标。事实证明,电话间隙的人做对了!希望这对任何处于我的情况的人有所帮助。
By changing the line above, although downloading from phonegap and installing still requests 3 permissions, uploading to the android market and then downloading to a device asks for internet only which was the goal. Turns out the phonegap guys got it right! Hope this helps anyone in my situation.