Question:
How to add badge values to application icon with a push notification and how to change it?
Answer:
In order to change a badge value with a push notification, you should simply set a desired value in Send Push form in Pushwoosh Control Panel:

To increment or decrement a current badge value, add "+1" or "-1" in Badges input field in Send Push form.
To set up a badge value with a push sent via Remote API, add "ios_badges" or "android_badges" keys to your /createMessage request. You can either set up a particular integer value (e.g. "ios_badges":5 will set up 5 as a value for badge counters on all receiving devices), or increment/decrement an existing badge value with a string "+1" or "-1".
Pushwoosh SDK handles all badge values received with push notifications automatically, no additional coding required. However, if you want to change badges in response to any events in your app, for example, clearing it when a push was opened, you can use the following Pushwoosh SDK methods:
iOS sendBadges
method:
Android PushwooshBadge
class:
Comments
0 comments
Please sign in to leave a comment.