0

I have tried below intent method but it does not work,

Intent intent = new Intent("android.intent.action.BADGE_COUNT_UPDATE");
    intent.putExtra("badge_count", 3);
    intent.putExtra("badge_count_package_name", getApplicationContext().getPackageName());
    intent.putExtra("badge_count_class_name", MainActivity.class.getName());
    getApplicationContext().sendBroadcast(intent);
Lahiru Chandima
  • 22,324
  • 22
  • 103
  • 179
Dhayalu
  • 113
  • 2
  • 12

1 Answers1

0

There is no standard way of doing. But you can refer to third party libraries but it supports only few devices. You can check the below library : https://github.com/leolin310148/ShortcutBadger

Ashwini
  • 245
  • 1
  • 7