是否可以有“可选"?Android中的权限? [英] Is it possible to have "optional" permissions in Android?

查看:20
本文介绍了是否可以有“可选"?Android中的权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android 应用程序是否可以通过任何方式将请求的权限声明为可选?

Is there any way for an Android application to declare requested permissions as optional?

即我想编写一个请求一组权限的应用程序,例如其中之一是访问用户联系人.现在,应用程序可以在没有此访问权限的情况下工作并做有用的事情,但如果授予它,它可以做更多的事情.

I.e. I want to write an app that requests a set of permissions, e.g. one of them being access to the user contacts. Now the application can work and do useful things without this access permission, but it can do more if it is granted.

有没有办法让应用程序说我想要权限 X,但你可以拒绝它,在这种情况下,我很乐意以减少的功能运行?"

Is there a way for and app to say "I want permission X, but you can refuse it in which case I'm happy to run with reduced functionality?"

推荐答案

我不这么认为,因为权限是在清单中设置的,并且在安装 .apk 时被用户接受.您可以构建具有较少权限和有限功能集的轻量级应用程序,并将其作为替代方案提供.

I don't believe so, since permissions are set in the manifest and accepted by the user upon installing the .apk. You could build a light version of the application with reduced permissions and limited feature set and offer it as an alternative.

这篇关于是否可以有“可选"?Android中的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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