A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
On Android there is no single, automatic system behavior for clearing app icon badges. Each launcher (Samsung, Microsoft Launcher, etc.) implements its own logic, and badges are typically driven either by:
- The launcher’s own unread-count tracking (for example, unread notifications or messages), or
- Explicit badge-count updates from the app’s code, using a launcher-specific mechanism.
Because of this, the badge will not necessarily disappear just because the app is opened. The app usually needs to update or clear the badge count in code when the relevant content (for example, notifications or messages) is considered “read”.
With .NET MAUI and the CommunityToolkit Badge API, the behavior is explicitly under application control. The toolkit documentation notes that:
- Android does not provide a standardized API for badge counts.
- Different launchers (including Microsoft Launcher and others) have their own mechanisms.
- The app must implement launcher-specific logic to ensure badges appear and clear correctly.
In practice this means:
- Implement an
IBadgeProviderfor each launcher that should be supported (for example, Samsung, Microsoft Launcher, etc.). - Register those providers in the Android
MainApplicationconstructor usingBadgeFactory.SetBadgeProvider(...). - When a push notification is handled (for example, when the user opens the app from the notification or views the related content), explicitly set the badge count to the desired value (often 0) via the badge provider logic.
If this logic is not implemented, or if the launcher in use is not covered by a provider, the launcher may keep showing the last badge count indefinitely, which matches the behavior being observed.
So yes, code changes are required: the app must explicitly manage badge counts per launcher and clear or reset them when appropriate (for example, after processing the push notification or marking items as read).
References: