Thank you for posting to the Telerik Developer Forums.
Currently, the badge value is set to the value received in the badge
key of the payload. The setApplicationBadgeNumber
method in the plugin can be used only when the app is running (for example, to update the badge value).
With the next release of Telerik Backend Services, expected till the end of the week, you will be able to increment/decrement the current value of the badge with the payload sent from the server. For example, by specifying +1 for the badge, the current value will be incremented with one. Note that the current state is saved in a dedicated field of the device registration on the server.
To take full benefit from this functionality provided by the server, developers can update the stored badge value for their device from the client app or from a admin app. Whenever the user "responds" to a notification, the app should decrement the badge value on the server by 1 or reset the value of the badge when the app is launched. This solution is up to the developer
and should be done programmatically from the client app.
Please, let me know if you have questions.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.