Reputation: 2564
I have a notification made with NotificationCompat.Builder mBuilder
and it cancels fine when passing .setAutoCancel(true);
to it, but I want it to cancel when also clicking on one of the given buttons with .addAction(R.drawable.ic_launcher, "Ignore", pIntent2)
, currently it does not cancel, how can I do it?
Upvotes: 0
Views: 71
Reputation: 21561
To clear a particular Notification you can do it like,
notificationManager.cancel(notification_id);
Upvotes: 2