bboylin / UniversalToast

简洁优雅可点击的toast控件,无BadTokenException风险,关闭通知权限依然正常显示。An elegant and flexible toast which can handle click event , avoid BadTokenException and run fine without notification permission

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android 8.1系统NotificationUtils.isNotificationEnabled总是返回true

congwiny opened this issue · comments

  • 我把应用通知给关了
    20180328170735937

  • 调用NotificationUtils.isNotificationEnabled返回true。下面是我debug跟踪的情况
    20180328170229635

还有就是想问下,Android 8.0设置WindowManager.LayoutParams为啥不能用 TYPE_APPLICATION_PANEL,TYPE_APPLICATION_ATTACHED_DIALOG类型呢?

v4包里提供的一个工具类比较好使
NotificationManagerCompat.from(context).areNotificationsEnabled()

8.0限制了悬浮窗权限,只能用APPLICATION_OVERLAY

试了下还真是,谢谢~

@bboylin android8.0 我试了下TYPE_APPLICATION_PANEL和TYPE_APPLICATION_ATTACHED_DIALOG都可以

嗯对,改过几次忘了测试了。