whatisgithub

What is shortcutbadger?

leolin310148/shortcutbadger — explained in plain English

Analysis updated 2026-06-24

7,337JavaAudience · developerComplexity · 2/5Setup · easy

In one sentence

An Android library that adds notification badge counts to app home screen icons across Samsung, LG, Sony, Xiaomi, and 10+ other manufacturer launchers, integrated with two method calls.

Mindmap

mindmap
  root((ShortcutBadger))
    What it does
      Badge counts on icons
      Launcher communication
      Android home screen
    Supported launchers
      Samsung LG Sony
      Xiaomi ASUS Huawei
      Nova Apex ADW
    Setup
      One Maven dependency
      Two method calls
    Audience
      Android developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add an unread message count badge to your Android app's home screen icon with just two method calls

USE CASE 2

Test whether your specific Android device and launcher combination supports badge counts before integrating

USE CASE 3

Build a notification badge system for a chat or email Android app that works across major phone manufacturers

What is it built with?

JavaAndroidMaven

How does it compare?

leolin310148/shortcutbadgerqihoo360/replugintraccar/traccar
Stars7,3377,3437,298
LanguageJavaJavaJava
Setup difficultyeasyhardhard
Complexity2/54/54/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Xiaomi devices require additional configuration documented in the project wiki due to Xiaomi's non-standard notification handling.

So what is it?

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.

Copy-paste prompts

Prompt 1
Add ShortcutBadger to my Android app to show unread message counts on the home screen icon, show me the Maven dependency and the exact method calls needed
Prompt 2
My Android app uses ShortcutBadger but the badge does not appear on Xiaomi devices, what extra configuration is required for Xiaomi?
Prompt 3
Show me how to remove a badge count with ShortcutBadger once the user reads all their notifications
Prompt 4
Which launchers does ShortcutBadger support? Help me write a runtime check to gracefully handle unsupported devices

Frequently asked questions

What is shortcutbadger?

An Android library that adds notification badge counts to app home screen icons across Samsung, LG, Sony, Xiaomi, and 10+ other manufacturer launchers, integrated with two method calls.

What language is shortcutbadger written in?

Mainly Java. The stack also includes Java, Android, Maven.

How hard is shortcutbadger to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is shortcutbadger for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.