Using Pushy notification listener to increase badge number

I’ve been developing a push notifications for an Ionic 3 app in which i want to increase the badge number via badge plugin from native resources (@ionic-native/badge) when i receive a push notification.

While the app is in foreground works perfectly and increase the badge number correctly, but when i try to do the same while the app is in background or closed the listener apparently doesn’t works properly because it receive the notification and show it in the notifications of iOS/Android system but it doesn’t execute the code in the listener increasing the badge.

Pushy.setNotificationListener(function (data) {
          // Print notification payload data
          console.log('Received notification: ' + JSON.stringify(data));
          // Increase badge

So in conclusion my question is: Is it possible to execute that code inside the listener to increase the badge when the push arrives and the app is closed or in background?

PD1: I’m using the version 1.0.21 of pushy-cordova and 1.0.0 of pushy-cordova-receiver.

PD2: I saw a push plugin in the native plugins of ionic that is capable to do that, but my backend is all well developed in order to use pushy, so changing to Push from native should be my last option because i don’t want to use GMS from google. I also found onesignal offers a SDK for ionic but in their docs i didn’t found something that covers my needs.