在安装过程中需要危险的权限 [英] Require dangerous permissions during installation

查看:155
本文介绍了在安装过程中需要危险的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自API级别23开始,Android引入了新方法来授予危险" '权限,而应用程序正在运行.这意味着必须在运行时授予诸如摄像头访问,电话访问等权限.

Since API level 23, android introduced a new approach to grant 'dangerous' permissions , while the app is running. That means that permissions such as camera access, phone call access and such will have to be given during run time.

我可以完全理解为什么这样做通常会非常有用,并且在安装过程中不会对用户造成威胁.但是,使用许多这样的危险"权限(出于所有正确的原因)的应用程序可能会在运行时轻易地使用户收到如此多的请求.仍然有一种方法可以强迫用户在安装过程中授予危险"权限吗?

I can completely understand why this can often be very useful, and less intimidating to users in the installation process. However, an app which uses many such 'dangerous' permissions (for all the right reasons) can easily annoy a user with so many requests in runtime. Is there still a way to force the user to grant 'dangerous' permissions during installation?

推荐答案

是否还有一种方法可以强迫用户授予危险" 安装过程中有权限吗?

Is there still a way to force the user to grant 'dangerous' permissions during installation?

否,除非您将targetSdkVersion设置为22或更低,否则由于向后兼容,因此在安装时授予了权限.

No, unless you set your targetSdkVersion to 22 or lower, so the permissions are granted at install time due to backward compatibility.

如果您的某个应用一次(例如在首次启动时)需要太多权限(即,权限组),则可以考虑重新设计您的应用,使其仅在真正需要时才请求权限.

If you have an app that requires too many permissions (i.e. permission-groups) at once (e.g. at first startup), you may consider to redesign your app to only request the permissions when they are really required.

这篇关于在安装过程中需要危险的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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