angularjscordovangcordovaionic-v1

Ionic v1 Local Notifications Trigger Status


$rootScope.$on('$cordovaLocalNotification:trigger', function(event, notification, state) {
    //code
});

I've tried above code, but its just for when the app is already open while notification. I want to count all the notifications which are triggered while the app wasn't opened. Is there any way?


Solution

  • I've found a solution in this way that, I've these notifications in my local storage, on device ready I compare current time with scheduled times and calculate all the notifications that're triggered and that're not.