Skip to content
 
 

Repository files navigation

ShortcutBadgerX: Android CI

Helper library to set android app icon badge count for different phone brand.
Forked from leolin310148/ShortcutBadger which seems no longer maintained.

Usage

  1. Add jitpack to your build script.
        repositories {
            maven { url 'https://jitpack.io' }
        }
  2. Add dependencies for ShortcutBadgerX.
        dependencies {
            implementation 'com.github.rlgo:ShortcutBadgerX:1.2.1'
        }
  3. Add the codes below:
        int badgeCount = 1;
        Notification.Builder builder = new Notification.Builder(getApplicationContext())
                    .setContentTitle("ShortcutBadgerX")
                    .setContentText("testing")
                    .setNumber(badgeCount)
                    .setSmallIcon(R.drawable.ic_launcher);
        Notification notification = builder.build();
        ShortcutBadger.applyNotification(getApplicationContext(), notification, badgeCount);
        notificationManager.notify(notificationId, notification);
        ShortcutBadger.applyCount(getApplicationContext(), badgeCount);

About

Helper library to set android app icon badge count for different phone brand.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages