简体   繁体   English

可以在安装时(清单中)请求Android普通级别权限吗?

[英]Can Android normal level permissions be requested at installation time (in the manifest)?

In later versions of Android (like 8.0.0), can we still declare normal level permissions in the manifest, like INTERNET permission and expect it to be granted at installation time? 在更高版本的Android(如8.0.0)中,我们是否仍可以在清单中声明普通级别的权限(如INTERNET权限),并期望在安装时将其授予?

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

or do we need to explicitly request them through the code? 还是我们需要通过代码明确要求它们?

If the second, do we need to ask for it on every single activity? 如果是第二个,我们是否需要在每个活动中都要求?

can we still declare normal level permissions in the manifest, like INTERNET permission and expect it to be granted at installation time? 我们是否仍可以在清单中声明普通级别的权限,例如INTERNET权限,并期望在安装时授予它?

Yes. 是。 Only dangerous ones need to be requested at runtime. 在运行时仅需要请求dangerous的对象。

Yes, you can declare normal level permissions in the manifest. 是的,您可以在清单中声明普通级别的权限。 But in 6.0 and above you have to check that permission is granted or not by user at runtime. 但是在6.0及更高版本中,您必须在运行时检查用户是否授予了权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM