androidandroid-8.0-oreonotification-channel

How to detect a Notification Channel is blocked by user in Android 8.0


Is there any callback my application receives when user blocks a Notification Channel created by my application OR it can be detected later ?


Solution

  • No, there is no such listener provided by the APIs. You will have to check each time before you make a notification.

    From the developer document

    To find out if a user blocked a notification channel, you can call getImportance(). If the notification channel is blocked, getImportance() returns IMPORTANCE_NONE.