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.

Some device manufacturers may add an unread notifications count to their custom Android interfaces (e.g. Samsung, Xiaomi, etc). When this is the case, the system will increment or decrease the value displayed on each app icon automatically.

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:

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:

{"aps":{"badge":99}}

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:

"messages": [
    {
      "channel_type": "push",
      "platform_type" : ["ios","android"],
      "title": "The campaign title",
      "body": "The campaign body",
      "ios": {
        "deep link": "https://example.com/",
        "custom_payload": "{\"aps\":{\"badge\":2}}"
      "android": {
        ...
      }
    }
  ]

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.

Last updated

Was this helpful?