Thank you for specifying this. I double-checked the code of the Telerik Push Notifications plugin and compared it with the initial Push Plugin used in AppBuilder here
. I searched for logic that can modify the expected behavior but to no avail. Also, I wasn't able to reproduce the behavior on an actual device using the plugins - always the badge is set with the value sent in the payload.
Please note that the application badge is set on OS level with the value of the "badge" key in the notification payload sent from the server. Based on the provided code snippet I can conclude that you are sending to Apple a badge with value 1. Thus the badge on the app icon will be set to 1 as well. You need to update the badge number by sending a request with the saved state of the badge count that you have on the server. For example:
The client app (e.g. the plugin) cannot influence the badge number when the app is in the background - the value on the badge is set to the value of the 'badge' key.
When the app is running you can use the setApplicationBadgeNumber
method in the plugin in order to update the badge icon on the app. The change will be shown when the app is exited/put in background. Otherwise the plugin will reset the badge count when the app is opened.
Please, let me know if you have further questions.