问题描述
我注意到,有两种类型的清单文件中,许可和权限采用-许可如下面所示的两个;
<允许机器人:名称=android.permission.MOUNT_UNMOUNT_FILESYSTEMS/>
<使用-权限的Android:名称=android.permission.WRITE_EXTERNAL_STORAGE/>
以下4权限里面做我用的时候我把它们放在我的manifest.xml文件? 使用-权限
或权限
?
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_WIFI_STATE
android.permission.INTERNET对
android.permission.CHANGE_WIFI_MULTICAST_STATE
有关
<许可>
借助文档状态:
所以,既然您正在访问Android的权限,你想使用-许可
代替。这方面的文档元素规定:
<许可>
制作自定义权限时,通常使用(例如做一个应用程序,其他应用程序可以在领带的时候,限制访问是必须的),和<使用-许可>
时使用您的应用程序确实需要它通常没有的权限。
I noticed that there are two types of permissions in the manifest file, "permission" and "uses-permission" like the two shown below;
<permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
for the following 4 permissions which do I use when I put them in my manifest.xml file? uses-permissions
or permissions
?
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_WIFI_STATE
android.permission.INTERNET
android.permission.CHANGE_WIFI_MULTICAST_STATE
For
<permission>
The documentation states:
Therefore, since you are accessing Android's permissions, you want uses-permission
instead. The documentation for this element states:
<permission>
is normally used when making a custom permission (e.g. when making an app that other apps can tie in to, limiting access is a must), and <uses-permission>
is used when your app actually needs a permission it doesn't have normally.
这篇关于使用-VS权限在manifest.xml文件Android权限的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!