Android互联网权限被忽略 [英] Android internet permission ignored

查看:80
本文介绍了Android互联网权限被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要互联网许可的应用程序,但它似乎对我不起作用.

I have an application that requires the internet permission but it doesn't seem to be working for me.

我添加了:

<uses-permission android:name="android.permission.INTERNET"/>

在清单上(在应用程序标签上方),当我安装该应用程序时,我的手机说:未请求权限",并且权限对话框未显示.

To the manifest (above the application tag) and when I install the app my phone says: "No permissions requested" and the permission dialog doesn't show up.

但是当我像这样用CAMERA替换INTERNET时:

However when I replace INTERNET with CAMERA like so:

<uses-permission android:name="android.permission.CAMERA"/>

它工作正常,并显示在设置的权限"标签下.

It works fine and shows up under the permissions tab in settings.

有什么想法吗?

谢谢

推荐答案

如果设备运行的是Android 6.0 (API级别23),且应用的targetSdkVersion 23或更高版本,如果某个应用在其清单中声明需要普通权限,则系统会在安装时自动向该应用授予该权限.
系统不会提示用户授予普通权限,并且用户无法撤消这些权限.

If the device is running Android 6.0 (API level 23) and the app's targetSdkVersion is 23 or higher if an app declares in its manifest that it needs a normal permission, the system automatically grants the app that permission at install time.
The system does not prompt the user to grant normal permissions, and users cannot revoke these permissions.

您可以在官方文档中找到 INTERNET 权限是正常的.
而是 CAMERA 权限是

As you can check in the official doc the INTERNET permission is normal.
Instead the CAMERA permission is dangerous.

这篇关于Android互联网权限被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆