Add an unread message count badge to your Android app's home screen icon with just two method calls
Test whether your specific Android device and launcher combination supports badge counts before integrating
Build a notification badge system for a chat or email Android app that works across major phone manufacturers
Xiaomi devices require additional configuration documented in the project wiki due to Xiaomi's non-standard notification handling.
ShortcutBadger is an Android library that lets an app display a number badge on its home screen icon, the same way iOS shows red circles with unread counts on app icons. Because Android does not have a built-in system for this and each phone manufacturer implements home screen launchers differently, a library like this needs to communicate with each launcher individually. ShortcutBadger handles that work on behalf of the developer. The library is available through Maven Central and added to a project by including one dependency line in the build configuration. Using it takes two method calls: one to set the badge count and one to remove it. This minimal API means most developers can get the feature working in a short amount of time. Supported launchers include Samsung, LG, Sony, HTC, Xiaomi, ASUS, Huawei, OPPO, ZTE, Yandex, and several third-party launchers such as Nova, Apex, KISS, and ADW. Huawei and OPPO are listed as partially supported. Xiaomi devices require additional configuration documented in the project wiki, because Xiaomi handles notifications differently from most other Android devices. A companion app called IsBadgeWorking is available on Google Play for anyone who wants to test whether their specific device and launcher combination is supported before integrating the library. The changelog in the README tracks every version back to 1.1.1 and shows a consistent pattern of adding new launcher support over time. The project is developed by Leo Lin. The README notes that if a Google Play Developer Distribution Agreement warning arrives, switching to version 1.1.0 or higher resolves the issue.
← leolin310148 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.