小米设备允许在后台运行时启用应用弹出窗口的权限 [英] Xiaomi devices permission to enable apps pop-up windows while running in the background

查看:52
本文介绍了小米设备允许在后台运行时启用应用弹出窗口的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

小米设备的最新更新引入了新的权限,该权限阻止在后台运行的我的应用(自定义快捷方式启动程序)在用户启用此权限之前起作用:在后台运行时显示弹出窗口"

Xiaomi devices latest update introduced a new permission that prevents my app (custom shortcuts launcher) that works in the background from working untill users enable this permission: ""Display pop-up windows while running in the background"

问题是,如何显示此权限的权限提示窗口,或者至少如何将用户重定向到其他权限"屏幕?

The question is, how can I show a permission prompt window for this permission, or at least how to redirect users to "other permissions" screen?

推荐答案

要将用户重定向到其他权限"屏幕,请使用此代码

To redirect users to the "other permissions" screen use this code

        Intent intent = new Intent("miui.intent.action.APP_PERM_EDITOR");
        intent.setClassName("com.miui.securitycenter",
                "com.miui.permcenter.permissions.PermissionsEditorActivity");
        intent.putExtra("extra_pkgname", getPackageName());
        startActivity(intent);

来源

仍在寻找一种方法来辨别此选项是否在语法上...

Still looking for a way to tell if this option is check or not prgrammatically...

更有趣的是,某些应用如何在任何用户交互之前设法检查了此选项...也许有一些秘密的miui权限?...

What's more interesting is, how some apps have managed to have this option checked before any user interaction... maybe there is some secret miui permission?...

这篇关于小米设备允许在后台运行时启用应用弹出窗口的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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