I send a few notification on the notification bar, i wanted to clear all of it when one of the notification is clicked. For now I clear one by one by using Flag. I know
My solution is to call it at onResume().
onResume()
@Override protected void onResume() { super.onResume(); // Clear all notification NotificationManager nMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); nMgr.cancelAll(); }