判断有没有悬浮窗权限,没有就跳转到权限设置界面
可以放到myu模块里面调用
对于一些必须要有悬浮窗权限才能实现的功能
//判断悬浮窗权限
java(uxfqx,null,"android.provider.Settings.canDrawOverlays","android.content.Context",activity)
//tw(uxfqx)
f(uxfqx==false)
{
sit(a, "action", "android.intent.action.VIEW")
sit(a, "action", "android.settings.action.MANAGE_OVERLAY_PERMISSION")
cls("android.content.ContextWrapper",类)
javax(one,activity,类,"getPackageName")
ss("package:"+one,pk)
sit(a, "data", pk)
uit(a, "chooser", "设置悬浮窗权限")
tw("请打开悬浮窗权限")
}
else
{
syso("悬浮窗权限正常")
}
------------------------------------空城旧念-------------------------