PushPlugin notificationReceived Called Multiple Times when Push Notification Received in Background


#1

If the Ionic iOS app is in the background and you receive a push notification for the first time, the $cordovaPush:notificationReceived’ event fires once when you click the notification and open the app. If you receive another push notification in the background and click on the notification, the notificationReceived event fires twice. If a third push received … fires 3 times and on and on. This does not happen if you receive push notifications in the foreground unless you have already received push notifications in the background. Receiving a push notification in the foreground does not add to the firing count like a background push does.

This is the code that gets executed multiple times depending on the number of push notifications received in the background.

$rootScope.$on(’$cordovaPush:notificationReceived’, function(event, notification) {
$log.debug(notification.alert, “Push Notification Received”);
}

Any suggestions appreciated.


#2

I am seeing this too.


#3

Are there any know solutions to this issue?


#4

yes, we have so here please add your post data (server side data) add notId with unique number. it will be working fine. try this idea. if you any questions please ask me.