I'm using Notifications (NotificationManager.notify()
) in my Countdown Timer app to sound an alarm in case the user is involved in a different app at the time it goes off.
It works really well, unless the user turns off notification (from the quick settings in JellyBeans+).
I want to check in code if the notification option is turned off, so I can choose a different alarm method.
Surprisingly, I found no information on the subject, and diving into Android code I see no such option in NotificationManager
, and it fails silently.
Is there a way to do it?
My post is old, but at last! In the support library for API 19+ there is an API for that now
NotificationManagerCompat.areNotificationsEnabled()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With