How to add a notification badge to your app icon?
Notification badges are handy to let your users know they have an unread push notification.
Android
On Android (8.0 and higher), notification badges (or "notification dots") are automatically displayed on your app icon when users have unread push notifications. Users can long-press on the app icon to see the list of unread notifications.

Android's notification badges are simple colored dots. This doesn't allow users to know how many unread push notifications they have for a specific app.
iOS
Batch allows you to display a badge in the top right corner of your iOS app icon when your users receive a new notification. Here is how it looks:

Badge counts are especially useful to show your users that new content is available in your app. This is a simple way to re-engage users and create more visits in a non-intrusive way.
You can add a badge to your notifications on iOS:
From the Dashboard
Via the Transactional or Campaigns API.
From the Dashboard
You set a badge count (e.g. 99) by copying/pasting the following code in Advanced settings > Payload:

Using the Campaigns API
This can be easily achieved by adding the same code to the custom_payload
field. Here is how it looks for a new campaign:
Find more information on how to use our API in the dedicated documentation.
Incrementing the badge value
iOS allows you to set a specific value for the badge count (e.g. 0, 3, 99) but doesn’t provide any mechanics to automatically increment or decrement the value displayed on your app icon when a notification is received.
You could handle that issue by saving remotely the most recent value of the badge for each install, and resetting it once the app is opened. We usually recommend against it as the badge may be reset while the device is offline.
Last updated
Was this helpful?