Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know if Show Notification is disabled for my app? [duplicate]

Is there any way to track whether the user has "Show notifications" disabled/unchecked in the Settings/App Info page of my app?

like image 749
Devansh Gupta Avatar asked May 09 '14 20:05

Devansh Gupta


People also ask

Why are my notifications disabled?

Cause of Notifications Not Showing up on AndroidDo Not Disturb or Airplane Mode is on. Either system or app notifications are disabled. Power or data settings are preventing apps from retrieving notification alerts. Outdated apps or OS software can cause apps to freeze or crash and not deliver notifications.

Why do I get double notifications on my phone?

Android devices with 2 copies of the app installed on the device can also receive duplicate notifications. This could happen if you have a production and staging / dev app installed at the same time with different Android package names.


1 Answers

Simple: You cant. In Google I/O 2012 answered: https://www.youtube.com/watch?v=Yc8YrVc47TI&feature=player_detailpage#t=1682s

update:

you can check if the user can see the notification in the status bar i.e. able TO CHECK (in the code) IF THE NOTIFICATION IS VISIBLE TO THE USER where android version >= 4.3.

http://developer.android.com/reference/android/service/notification/NotificationListenerService.html#getActiveNotifications%28%29

like image 73
josedlujan Avatar answered Oct 03 '22 00:10

josedlujan