added clearPendingNotification function for discarding the pending notifications to popup.