Include Unread Message Count in Push Notification Payload (FCM & APNs)
We would like to request the addition of the current user’s unread message count in all push notification payloads sent through both FCM and APNs.
At the moment, we are able to update the app badge count only when the application is running. However, once the app is closed, removed from the background, or the device is locked, the badge count does not update. Since APIs cannot run in the background, push notifications are the only reliable mechanism to keep the badge count accurate.
By including the unread message count directly in the push notification payload, the app will be able to update the badge count consistently across all states (foreground, background, terminated).
We hope this enhancement can be considered, as it will greatly improve the user experience for applications that rely on accurate badge notifications.
Log in to comment and vote
Comments1
Hey! Great news — this is now live! 🎉
CometChat now includes the unread message count directly in the push notification payload for both FCM and APNs. This means your app can update the badge count accurately across all states - foreground, background, and terminated — without needing the app to be running.
You can find the full implementation details in our documentation here:
https://www.cometchat.com/docs/notifications/badge-count
Let us know if you have any questions!