Android Question Detecting when a notification is dismissed by the user?

Inman

Well-Known Member
Licensed User
Longtime User
From Android 4.0, a user can dismiss a notification either by swiping it or by using the Clear All button. I would like to know when this happens to notifications generated by one of my apps. I believe this can be done using DeleteIntent.

http://developer.android.com/reference/android/app/Notification.html#deleteIntent
The intent to execute when the notification is explicitly dismissed by the user, either with the "Clear All" button or by swiping it away individually. This probably shouldn't be launching an activity since several of those will be sent at the same time.

Since my app is for devices running Android 4 and above, I hope this works correctly. Could you please help me with this?
 

Inman

Well-Known Member
Licensed User
Longtime User
Thanks Erel. I thought it was more like a generic B4A/Android requirement, like a BroadcastReceiver. I am already using NotificationBuilder library by barx. I will ask him if this is possible.

EDIT:

Well, guess what. He already implemented it. Only, it is referred to as SetDeleteActivity and SetDeleteService.

barx rocks!!!
 
Last edited:
Upvote 0
Top