public List<Integer> getNotificationIdsByType(Notification.Type type) {
        // Returns triggered and scheduled notifications
        if (type == Notification.Type.ALL) return getNotificationIds();

        List<Integer> activeIds = new ArrayList<Integer>();

        for (StatusBarNotification statusBarNotification : getActiveNotifications()) {
            activeIds.add(statusBarNotification.getId());
        }

        if (type == TRIGGERED) return activeIds;

        // Return scheduled notifications
        List<Integer> notificationIds = getNotificationIds();
        // Remove triggered notifications
        notificationIds.removeAll(activeIds);

        return notificationIds;
    }
Get saved notification ids for a given type.
@param type The notification life cycle type
src/android/Manager.java