Push Notificaiton Callback problem

Hi guys!!

I succeded to register to Push Notificaion Service and to Receive the notifications.
Now I’ve this problem (the bold one):

  • if the app is opened and a notification arrived --> my notification callback is called as expected

  • if the app is in background and a notification arrived and I click on the notification --> my notification callback is called as expected

  • if the app is in background and a notification arrived, if I don’t do nothing, my callback is never called. Than I’m not able, for example, to update the Icon Application badge number

Ionic.io();
var push = new Ionic.Push({
onNotification: function (notification) {
incrementBadge(notification);
}
});

No one have this problem or can help me?

It seems callback for push notifications only are called when your app is in foreground or minimized.

You have two options. Send a normal notification and click on it to open the app or send a silent notification, on which not appears in the system tray and open your app manually.

More on push notifications:

It seems background mode plugin don’t works as we expect. No processing occurs when you app is closed (back button o close via side menu), just when it’s minimized.