Android NotificationListenerService: how to know if user clicked on the notification (opening the related app) or simply deleted it
问题 I'm working with notifications generated by every app (not only mine) on my Android device (android 5.1.1). By extending NotificationListenerService I'm able to know when a push notification is posted (overriding the "onNotificationPosted" method) and when a notification is removed (overriding the "onNotificationRemoved" method). The problem is that I would like to know how the notification was removed: a) by clicking it (so opening the app) or b) by swyping it (so it is only removed) ? Is it