在android中读取没有NotificationListenerService的通知

时间:2013-12-26 21:50:37

标签: android service notifications listener

我目前正致力于阅读某些通知然后对其中某些通知进行静音的应用。我已经在Android 4.3+上使用NotificationListenerService进行了管理,但我也想让它与以前的版本兼容。那么无论如何都要收听传入的通知并获取其内容吗?

我听说过AccesibilityService,但我不太明白是否可以使用它来阅读通知内容以及如何阅读。有什么建议吗?

感谢adavnce!

1 个答案:

答案 0 :(得分:1)

可以使用辅助功能服务(事件64) 您可以从中获取通知对象,然后解析它。

这里有一个解析通知的示例类:http://notifications-widget.googlecode.com/svn/trunk/NotificationsWidget/src/com/roymam/android/notificationswidget/NotificationParser.java

相关问题