Code example for NotificationManager

Methods: cancel

0
     * Cancels a single notification by tag. 
     * 
     * @param tag Notification tag to cancel. 
     */ 
    public void clearNotification(String tag) {
        mNotificationManager.cancel(tag.hashCode());
    } 
 
    /** 
     * Removes all Notifications from the status bar. 
     */ 
    public void clearAllNotifications() { 
        mNotificationManager.cancelAll();
    } 
 
    /** 
     * Called when a notification is clicked. 
     * @param intent The new Intent passed from the notification. 
     */ 
    @Override 
Stop searching for code, let great code find you!  Add Codota to your java IDE