SYSTEM_ALERT_WINDOW-如何在Android 6.0和targetSdkVersion 23上自动获得此权限 [英] SYSTEM_ALERT_WINDOW - How to get this permission automatically on Android 6.0 and targetSdkVersion 23

查看:157
本文介绍了SYSTEM_ALERT_WINDOW-如何在Android 6.0和targetSdkVersion 23上自动获得此权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Facebook,Evernote,Pocket-所有应用程序都以23(targetSdkVersion=23)为目标,但它们会自动在Android 6.0上获得此权限.

Facebook, Evernote, Pocket - all apps get this permission on Android 6.0 automatically, even though they are targeting 23 (targetSdkVersion=23).

关于新的棉花糖权限模型,有很多文档.其中之一是SYSTEM_ALERT_WINDOW被提升"为高于危险"权限等级,因此需要特殊的用户干预才能与这些用户一起授予应用程序权限.如果应用程序的targetSdkVersion 22或更低版本,则应用程序会自动获得此权限(如果清单中要求).

There has been a lot of documentation regarding the new Marshmallow permission model. One of them is SYSTEM_ALERT_WINDOW been 'promoted' to 'above dangerous' permission class thus requiring a special user intervention in order for apps to be granted with those. If the app has targetSdkVersion 22 or lower, app gets this permission automatically (if requested in the manifest).

但是,我注意到有些应用程序具有此权限,而无需将用户发送到Draw over other apps权限的设置特殊页面.我看到了Facebook,Evernote,Pocket-也许还有更多.

However, I've noticed some apps that get this permission, without needing to send the user to the setting special page of Draw over other apps permission. I saw Facebook, Evernote, Pocket - and perhaps there are more.

任何人都知道在没有用户通过Settings -> Apps -> Draw over other apps的情况下如何向应用授予此权限吗?

Anyone knows how an app can be granted this permission without the user go through Settings -> Apps -> Draw over other apps?

谢谢

推荐答案

这是棉花糖 6.0.1 中引入的一种新行为.

It is a new behaviour introduced in Marshmallow 6.0.1.

每个请求SYSTEM_ALERT_WINDOW权限并且通过Play商店安装(要求版本 6.0.5 或更高版本)的应用都将自动授予该权限.

Every app that requests the SYSTEM_ALERT_WINDOW permission and that is installed through the Play Store (version 6.0.5 or higher is required), will have granted the permission automatically.

如果相反,该应用是侧面加载的,则不会自动授予该权限.您可以尝试从

If instead the app is sideloaded, the permission is not automatically granted. You can try to download and install the Evernote APK from apkmirror.com. As you can see you need to manually grant the permission in Settings -> Apps -> Draw over other apps.

这些是提交 [1]

These are the commits [1] [2] that allow the Play Store to give the automatic grant of the SYSTEM_ALERT_WINDOW permission.

这篇关于SYSTEM_ALERT_WINDOW-如何在Android 6.0和targetSdkVersion 23上自动获得此权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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