How can I tell when my notification is dismissed using the Rejected button and not the delete button?
I have an application that sends notifications to the system tray. Each of them has DeleteIntent
. Target runs to both delete and delete everything from the system tray.
Can these two types of layoffs be distinguished?
+3
source to share
1 answer
TL; DR; Not yet (API 22 is the latest version)
As of API 22, there is still no way to detect differences within your application. One round on how to figure it out - if you get a bunch of layoffs soon.
05-08 23:04:58.360 15849-15849/com.bidyut.notificationtest D/wtf﹕ action_dismiss 05-08 23:04:58.360 15849-15849/com.bidyut.notificationtest D/wtf﹕ action_dismiss 05-08 23:04:58.364 15849-15849/com.bidyut.notificationtest D/wtf﹕ action_dismiss 05-08 23:04:58.364 15849-15849/com.bidyut.notificationtest D/wtf﹕ action_dismiss 05-08 23:04:58.364 15849-15849/com.bidyut.notificationtest D/wtf﹕ action_dismiss
As you can see, they are all within one second. However, this type of detection can only be considered if your application will have multiple notifications at that point in time.
+3
source to share