【发布时间】:2021-09-03 08:00:53
【问题描述】:
【问题讨论】:
标签: android android-notifications
【问题讨论】:
标签: android android-notifications
【讨论】:
我想建议您阅读官方文档,这对您有很大帮助,bi
areNotificationEnabled:- https://developer.android.com/reference/androidx/core/app/NotificationManagerCompat
public boolean areNotificationsEnabled()
返回调用包的通知是否未被阻止。
通知暂停:- https://developer.android.com/reference/android/app/NotificationManager
public boolean areNotificationsPaused()
返回此包中的通知是否暂时隐藏。可以这样做是因为包裹通过PackageManager#setDistractingPackageRestrictions(String[], int) 标记为分散用户注意力,或者因为包裹被PackageManager#setPackagesSuspended(String[], boolean, PersistableBundle, PersistableBundle, SuspendDialogInfo) 暂停。
【讨论】: