android - Delete all the notifications on click -


in app i'm creating 3 notifications (with id 0,1, 2) depending on data.

i use

 setcancel(true); 

on notification in order let system cancel on user click. cancell notifications (id 0,1,2) on userclick on 1 of them. possible?

this code notification creation:

    notificationmanager notificationmanager = (notificationmanager) context.getsystemservice(context.notification_service);     intent notificationintent = new intent(context, activitymain.class);     pendingintent contentintent = pendingintent.getactivity(context, 0, notificationintent, pendingintent.flag_cancel_current);      notification.builder builder = new notification.builder(context);     notification notification = null;      builder.setcontenttitle(title)            .setcontentintent(contentintent);      notification = new notification.bigtextstyle(builder).bigtext(mex).build();      notificationmanager.notify(id, notification); 

take @ notificationmanager#cancelall method


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -