Please have a look at my Pending Intent code.
notificationIntent.putExtra("is_from_notification", true);
notificationIntent.putExtra("push_message_id", push_message_id);
notificationIntent.putExtra("open_target", open_target);
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent contentIntent = PendingIntent.getActivity(context,notifyID, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
Notification noti = new NotificationCompat.Builder(context)
.setSmallIcon(icon_small)
.setTicker(message)
.setLargeIcon(largeIcon)
.setWhen(System.currentTimeMillis())
.setContentTitle(title)
.setContentText(message)
.setContentIntent(contentIntent)
.setAutoCancel(true).build();
NotificationManager notificationManager = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(notifyID, noti);
My Problem is that, where and how should I clear this pending intent. It stays as far as app is in recent tasks.