the screenshot contains notifications from two different applications. in the upper notification , there is a cancel button, How to add that button in notification. Any help will be extremely thankful.
Asked
Active
Viewed 1,003 times
2 Answers
2
You'd need to create a notification with a custom layout (view here) how to do that. You can attach a click listener with a pending intent to a button like so.

Community
- 1
- 1

Toon Borgers
- 3,638
- 1
- 14
- 22