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

Guillaume Perrot picture Guillaume Perrot · Jul 25, 2012 · Viewed 59.8k times · Source

Android 4.1 offers the user a check box to disable notifications for a specific application.

However, as a developer we have no way to know whether a call to notify was effective or not.

I really need to check if the notifications are disabled for the current application but I can't find any setting for that in the API.

Is there ever a way to check this setting in the code?

Answer

Blundell picture Blundell · Jul 25, 2012

You can't 100% can't.

It is asked in this Google I/O 2012 video and the Project lead for the new notifications declares that you can't.


Edit

2016 update: Now you can check it, as said in this Google I/O 2016 video.

Use NotificationManagerCompat.areNotificationsEnabled(), from support library, to check if notifications are blocked on API 19+. The versions below API 19 will return true (notifications are enabled).

enter image description here