Reputation: 5106
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!
Upvotes: 1
Views: 1488
Reputation: 8100
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
Upvotes: 1