1

I'm currently working on app that read certain notifications and then silencing some of them. I've managed doing this using NotificationListenerService on Android 4.3+ but I would like to make it compatible for previous versions too. So is there anyway to listening to incoming notifications and getting its content?

I heard about AccesibilityService but I don't quite understand if it is possible to use it to read notifications' content and how. Any suggestions?

Thanks from adavnce!

Gershon Papi
  • 5,008
  • 3
  • 24
  • 50
  • possible duplicate of [Detect a new Android notification](http://stackoverflow.com/questions/9367196/detect-a-new-android-notification) – petey Dec 26 '13 at 22:26
  • it's not since I also need to read the notification's content and not only detecting when and if it was recieved. – Gershon Papi Dec 29 '13 at 10:17

1 Answers1

1

It's possible with the accessibility service (event 64) You can get at the notification object from this and then parse it.

There's a sample class of parsing the notification here: http://notifications-widget.googlecode.com/svn/trunk/NotificationsWidget/src/com/roymam/android/notificationswidget/NotificationParser.java

Andrew
  • 7,548
  • 7
  • 50
  • 72