Search code examples
javascriptcordovalocalnotification

How can i view already scheduled notifications in cordova-plugin-local-notification?


I used cordova plugin local notification to set reminders in my app, it works fine, but can i view already scheduled notifications?. in my README.md, i can see getScheduled method, but it doesn't explain how to use it.


Solution

  •  var callbackIds = function (ids) {
                                         alert(ids);
                                        navigator.notification.alert(ids.length === 0 ? '- none -' : ids.join(' ,'));
    
                                    };
    
                                    getIds = function () {
                                        cordova.plugins.notification.local.getIds(callbackIds);
                                    };
    
                                    function getScheduledIds() {
                                        cordova.plugins.notification.local.getScheduledIds(callbackIds);
                                    }
    
    
                                    getTriggeredIds = function () {
                                        cordova.plugins.notification.local.getTriggeredIds(callbackIds);
                                    };