16

I'm developing for the Android, and I want to be able to get an array of the current notifications. For example, say I have two texts and 3 facebook notifications, I want to be able to get a list of what they are, or at least get the type of them. Is there any possible way to do this with the android api?

Jay
  • 983
  • 2
  • 8
  • 23

2 Answers2

20

This is possible with android 4.3 upwards now

See http://developer.android.com/reference/android/service/notification/NotificationListenerService.html#getActiveNotifications()

Andrew
  • 7,548
  • 7
  • 50
  • 72
4

This is not possible due to security issues. Its like stealing/intercepting other app's info which is not allowed in framework.


Update

This answer was provided on the basis of facts available till Mar 27 '12.

waqaslam
  • 67,549
  • 16
  • 165
  • 178
  • Ok, that stinks, could I at least get a boolean of whether there are any notifications or not? – Jay Mar 27 '12 at 21:34
  • Sorry, you cant. Read this http://stackoverflow.com/questions/3630733/how-to-check-which-notifications-are-active-in-status-bar-in-android-dev – waqaslam Mar 27 '12 at 21:36