src/android/LocalNotification.java
public static void cancel (String notificationId) {
        /*
         * Create an intent that looks similar, to the one that was registered
         * using add. Making sure the notification id in the action is the same.
         * Now we can search for such an intent using the 'getService' method
         * and cancel it.
         */
        Intent intent = new Intent(context, Receiver.class)
            .setAction("" + notificationId);

        PendingIntent pi       = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
        AlarmManager am        = getAlarmManager();
        NotificationManager nc = getNotificationManager();

        am.cancel(pi);

        try {
            nc.cancel(Integer.parseInt(notificationId));
        } catch (Exception e) {}

        fireEvent("cancel", notificationId, "");
    }
/**
     * Cancel a specific notification that was previously registered.
     *
     * @param notificationId
     *            The original ID of the notification that was used when it was
     *            registered using add()
     */
Cancel a specific notification that was previously registered.
@param notificationId
The original ID of the notification that was used when it was
registered using add()
Cancel a specific notification that was previously registered . @param notificationId The original ID of the notification that was used when it was registered using add ()
public static void cancel (String notificationId) {
        /*
         * Create an intent that looks similar, to the one that was registered
         * using add. Making sure the notification id in the action is the same.
         * Now we can search for such an intent using the 'getService' method
         * and cancel it.
         */
        Intent intent = new Intent(context, Receiver.class)
            .setAction("" + notificationId);
        PendingIntent pi       = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
        AlarmManager am        = getAlarmManager();
        NotificationManager nc = getNotificationManager();
        am.cancel(pi);
        try {
            nc.cancel(Integer.parseInt(notificationId));
        } catch (Exception e) {}
        fireEvent("cancel", notificationId, "");
    }
public static void cancel ( String notificationId ) { /*
         * Create an intent that looks similar, to the one that was registered
         * using add. Making sure the notification id in the action is the same.
         * Now we can search for such an intent using the 'getService' method
         * and cancel it.
         */ Intent intent = new Intent ( context , Receiver . class ) . setAction ( "" + notificationId ) ; PendingIntent pi = PendingIntent . getBroadcast ( context , 0 , intent , PendingIntent . FLAG_CANCEL_CURRENT ) ; AlarmManager am = getAlarmManager ( ) ; NotificationManager nc = getNotificationManager ( ) ; am . cancel ( pi ) ; try { nc . cancel ( Integer . parseInt ( notificationId ) ) ; } catch ( Exception e ) { } fireEvent ( "cancel" , notificationId , "" ) ; }
Cancel a specific notification that was previously registered.
Cancel a specific notification that was previously registered .