public void clear() {
        Log.d(TAG, "Clear notification, options=" + options);

        // Clear the notification from the statusbar if posted
        NotificationManagerCompat.from(context).cancel(LocalNotification.getAppName(context), getId());

        // If it is the last occurrence remove the notification from SharedPreferences
        if (triggerhandler.isLastOccurrence()) {
            removeFromSharedPreferences();
        }

        // Inform WebView about the clearing
        if (LocalNotification.isAppRunning()) LocalNotification.fireEvent("clear", this);
    }
Clears the notification from Statusbar. If the notification was the last one,
the notification will be removed from SharedPreferences.
The WebView will receive a clear event, if the app is running.
src/android/Notification.java