Support for Automatically Updating App Icon Badge on Receiving Push Notifications in Flutter
The app icon badge does not appear when new messages are received. There is a need to update the badge count with the number of unread messages upon receiving a push notification, but the badge is not being displayed.
This feature request aims to support automatic or simplified updating of the app badge count when new messages arrive, especially through push notifications, to ensure accurate unread message indicators.
Log in to comment and vote
Comments1
🎉 This is now live! App icon badge count on push notifications is fully supported in Flutter - for both Android and iOS.
Here's how it works:
How to enable it: Enable the Unread Badge Count toggle in your CometChat Dashboard under Notification Engine → Settings → Preferences → Push Notification Preferences. Once enabled, every push notification payload will include an
unreadMessageCountfield automatically.On iOS (APNs): No extra client-side code needed - CometChat sets the
aps.badgevalue server-side, and iOS updates the app icon badge automatically when the notification is delivered. Just make sure you clear the badge when the app opens (see docs).On Android (FCM) & iOS via FCM: Add the
app_badge_plusdependency and use theunreadMessageCountvalue from the FCM payload to callAppBadgePlus.updateBadge(count). The badge clears automatically when the user opens the app.📖 Documentation:
Badge Count Overview
Flutter Android Implementation
Flutter iOS Implementation
Thanks for raising this — let us know if you run into any issues! 🙌