android - Android M 中的互联网权限

标签 android permissions android-6.0-marshmallow

关于谷歌最近关于 Android M 和权限模型的公告。

根据 official Android documentation :

Limited Permissions Granted at Install Time: When the user installs or updates the app, the system grants the app all permissions that the app requests that fall under PROTECTION_NORMAL. For example, alarm clock and internet permissions fall under PROTECTION_NORMAL, so they are automatically granted at install time. The system may also grant the app signature and system permissions, as described in System apps and signature permissions. The user is not prompted to grant any permissions at install time.

特别注意它说:

...the system grants the app all permissions that the app requests.

那么,如果应用在其 AndroidManifest.xml 中没有 INTERNET 权限,那么在这种情况下它就不会被授予 INTERNET 访问权限吗?

或者应用是否需要在其 list 中添加 INTERNET 权限才能进行网络调用?

最佳答案

As for the specific android.permission.INTERNET permission, it is still mandatory for apps that will access the Internet. If a developer were to publish an app without defining it in the Android manifest, an exception will be thrown the first time a connection attempt is made, and the app will possibly crash. This is no different than before.

唯一不同的是不会向用户提示,应用程序仍需要 list 中的权限。

关于android - Android M 中的互联网权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30742186/

相关文章:

android - 为什么我的if语句只运行android中的else部分

Android:通过 AOSP 源代码创建新的系统权限。

asp.net - IIS AppPoolIdentity 和文件系统写入访问权限

java - CardView 无法正常工作

android - 状态栏变白,后面不显示内容

java - Android 的新 Google Play 游戏服务排行榜 API

java - 正确使用聚合(OOP)以电子电路类为例

java - 为什么我无法添加操作栏按钮?

facebook-graph-api - 新的 Facebook 权限 API (v2.0) 支持

android - float 操作按钮android更改图标