Ionic2 Android application increse badge counter from payload with receiving push notification



I’m trying to get and increase badges over the app icon with receiving of push notification, here is my home.ts with message and get request. My server side php based on this example, which uses Firebase API_ACCESS_KEY.

I am sending a JSON.stringify(mess) to php. Then with receiving of push notification in app.components.ts with initPushNotification();:

in result I got desired badge counter circle over the app icon with receiving push notification, but with receiving of second notification counter number is still 1.

What value I have to increase with +1 for each received notification, instead of this.badgeNumber; variable in code below, which works only in foreground with this.increaseBadges(this.badgeNumber); in initPushNotification();

badge: '1', of payload comes from the sender as fixed number, how to use it?