I'm trying to create a stack notification in the action bar. I want to update the counter (++counter) when a new notification arrives and show the counter value in the action bar. like this: "2 new messages"
My problem is that when the user has already clicked on the notification message then it is deleted from the actionBar. Then later if a new notification appears I want my counter to reset and again show in the action bar the sum of messages that have not been read.
How can I know if the notification has already been removed/read from the action bar?