[英]Android marshmallow after granting permission through Appop Denial error for SYSTEM_ALERT_WINDOW permission
Hi i am trying to get SYSTEM_ALERT_WINDOW permission i have added <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
in my manifest file. 嗨,我想获得SYSTEM_ALERT_WINDOW权限,我在我的清单文件中添加了
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
。 Now when i install the release build, it asks for permission and everything works as expected in marshmallow. 现在,当我安装发布版本时,它会请求权限,并且所有内容都在marshmallow中按预期工作。 But when i install it from playstore it automatically grants me SYSTEM_ALERT_WINDOW permission, but when i try to start a System overlay service, it is giving me error.
但是,当我从playstore安装它时,它会自动授予我SYSTEM_ALERT_WINDOW权限,但是当我尝试启动系统覆盖服务时,它会给我错误。
W/ActivityManager: Appop Denial: Accessing service ComponentInfo{packagename/packagename.classname} from pid=6189, uid=10289 requires appop SYSTEM_ALERT_WINDOW
But when i checked facebook chathead it was working without asking me permissions. 但当我检查Facebook聊天时它没有问我权限工作。
How do i check for appop denial permissions? 我如何检查appop拒绝权限?
It may not be asking for the permissions if already allowed please check as below: 如果已经允许,可能不会要求权限请检查如下:
No permissions have been granted if you go to Settings > Apps > "Your app" > Permissions. 如果您转到“设置”>“应用”>“您的应用”>“权限”,则未授予任何权限。
You should uninstall clear app data and uninstall it completely, then install via playstore. 您应该卸载清除应用程序数据并将其完全卸载,然后通过Playstore安装。
If you don't want to do implement the new system yet then you can reduce your target sdk version to 22 to get the old permission system. 如果您不想实现新系统,那么您可以将目标sdk版本减少到22以获得旧的权限系统。 You can still compile with sdk version 23 though.
您仍然可以使用sdk 23版进行编译。
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.