Code example for NotificationManager

Methods: cancelAll

3
 
    /** 
     * 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 
    public void onNewIntent(Intent intent) {
        // The incoming Intent may or may not have been for a notification. 
        String tag = intent.getStringExtra("notificationTag");
        if (tag != null) {
        	 this.webView.sendJavascript("window.Notification.callOnclickByTag('"+ tag + "')");
        } 
    } 
Contextual code suggestions in your IDE  Get Codota for Java