有没有办法以编程方式请求许可? [英] Is there any way to ask permission programmatically?

查看:28
本文介绍了有没有办法以编程方式请求许可?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以在 android 中以编程方式请求许可吗?我不想将所有权限添加到 AndroidManifest.xml.那么有没有在运行时请求权限的对话框?

Is there any way to ask permission programmatically in android ? I don't want to add all permission to AndroidManifest.xml. So is there any dialog that asks for permission at runtime?

推荐答案

没有.用户需要在安装应用程序时被告知权限.在运行时询问用户会带来安全风险.

No. The user needs to be informed about the permissions while installing the application. Asking the user at runtime would be a security risk.

这篇关于有没有办法以编程方式请求许可?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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