1

How to check if “show notification” is enabled?

My app is integrated with parse.com and whenever it gets a response from parse.com, it generates a notification and shows it to user.

I need to know that if user has disabled "show notification" checkbox. I have to show a dialog as disabled to the user while trying to login. I haven't used notification service into my app.

Please make me suggestion on how to solve this.

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
Manikandan
  • 131
  • 13

1 Answers1

0

When you know that your app is sending out a push notification you can check if it is in the Notification area. This is assuming your app's minimum SDK is 4.3 . Basically you are checking all active notifications to see if your notification is within the active notifications.

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

vbhakta
  • 107
  • 1
  • 6