如何检查是否允许通过用户的android否认 [英] how to check whether a permission is denied by user in android

查看:94
本文介绍了如何检查是否允许通过用户的android否认的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我的应用程序要求的清单文件,就像android.permission.WRITE_EXTERNAL_STORAG​​E许可,我如何检查由用户或某些安全应用程序的权限是否被拒绝?

for example,my app requests a permission in Manifest file,like android.permission.WRITE_EXTERNAL_STORAGE,how can i check whether the permission is denied by user or some security apps?

推荐答案

目前,机器人要求用户接受所有的应用程序要求在清单上安装的权限。在即将到来的中号发布,Android将切换到权限的iOS的风格与所需要的基础。 (对于某些权限。见@ Commonsware的评论详细介绍)每当用户尝试使用某个功能在需要的权限它会要求他们接受或拒绝含义。如果他们打否认我想会有一个SDK积极和消极的响应按钮接口来实现。

Right now, android asks for the user to accept all the permissions an app asks for in the manifest on installation. In the upcoming M release, android will switch over to the iOS style of permissions with an "on needed" basis. (For certain permissions. See @Commonsware's comment for more details) Meaning whenever the user tries to use a feature that requires permission it will ask them to accept or deny. If they hit deny I imagine there will be an sdk positive and negative response button interface to implement.

至于现在在你的困境,如果用户拒绝的权限,他们将无法使用你的应用时期。

As for right now in your dilemma, if the user rejects permissions they won't be able to use your app period.

这篇关于如何检查是否允许通过用户的android否认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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