config.xml 格式问题

发布于 2024-12-02 22:52:50 字数 1168 浏览 2 评论 0原文

我试图阻止 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒几许 2024-12-09 22:52:50

通过更改上面的行,虽然从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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文