权限更改了Android 6.0中的回调 [英] Permission changed callback in Android 6.0

查看:342
本文介绍了权限更改了Android 6.0中的回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道当用户在Android 6.0的应用设置中更改权限时,是否有某种方法可以收到通知。没有运气,我一直在寻找这个答案。你知道广播接收器和一些特定的意图是否可行?或者可能有一些黑客来实现这个目标?

I wonder if there is some way to being notified when user changes permission in app settings on Android 6.0. I was looking for this answer with no luck. Do you know if it is possible with broadcast receiver and some specific Intent? Or maybe there is some hack to achieve this?

推荐答案

根据这个答案,当用户从设置屏幕撤销权限时,没有任何广播/事件可以拦截。

according to this answer, there is no any broadcast/event that you can intercept when permission revoked from the settings screen by the user.

但是好的消息,假设您关注的是 - 如果您的权限状态发生任何变化,系统会自动终止您的流程应用流程还活着

but the "good" news, in assumption that it's your concern - your process will be terminated automatically by the system if there will be any changes to the permission status while your app process was alive

这篇关于权限更改了Android 6.0中的回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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