getActivity / Toaster

Android 吐司框架,专治 Toast 各种疑难杂症
Apache License 2.0
3.2k stars 404 forks source link

still not work in emui9.0 #4

Closed huangying812 closed 5 years ago

huangying812 commented 5 years ago

device huawei p20pro api level emui9.0 android9.0 ezgif-5-b15e82d6dff2

huangying812 commented 5 years ago

works fine in other emui8.0 or lower

getActivity commented 5 years ago

你好,ToastUtils判断通知栏是否开启的方法,在SDK大于等于24的时候,是采用了原生的API,NotificationManager.areNotificationsEnabled(),参考至谷歌官方的兼容包中的NotificationManagerCompat.from(context).areNotificationsEnabled(),由此可判断可能是华为新版的系统篡改了谷歌部分API,在这个问题未被定型之前不给予兼容,因为这个可能是一个系统Bug,厂商可能后续会进行修复

getActivity commented 5 years ago

这个问题可能是你关闭通知栏权限后没有重启应用导致的,建议你再试试看