Skip to main content

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.

Status: Completed1 comment

Log in to comment and vote

Comments1

  • Pourav Raj changed status to Completed
    TeamPinned

    🎉 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 unreadMessageCount field automatically.

    On iOS (APNs): No extra client-side code needed - CometChat sets the aps.badge value 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_plus dependency and use the unreadMessageCount value from the FCM payload to call AppBadgePlus.updateBadge(count). The badge clears automatically when the user opens the app.

    📖 Documentation:

    Thanks for raising this — let us know if you run into any issues! 🙌