How to know whether Notifications are enabled or not for an application in android?

前端 未结 2 1402
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-02 00:30

I\'ve a ListView which has the list of installed applications and for each application, I need to know whether the notifications are enabled or not. Currently I\'m using bel

2条回答
  •  [愿得一人]
    2021-01-02 00:55

    See if you can use NotificationManagerCompat.areNotificationsEnabled() https://developer.android.com/reference/android/support/v4/app/NotificationManagerCompat.html#areNotificationsEnabled()

    Android 4.1: How to check notifications are disabled for the application?

提交回复
热议问题