0

i am an android developer.i want to display notification count on launcher icon in android.It can be possible with "shortcutBadger" library but it is not working for android versions 5, 6 and 7. i don't want widget option.Can any one suggest me the solution. Thank you in advance.

honey
  • 21
  • 1
  • 1
  • 1
    Launcher badges a only supported by certain launchers hence the reason why that library has so many updates and fixes. I wouldn't rely on that library constantly working. – tyczj Feb 07 '18 at 16:56

1 Answers1

3

The shortcut badger support the notification counter on specific devices as it is stated in the repository description: "An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers."

This covers some huawei, xiaomi and other devices....it is not related to the OS version, you probably didn't pay attention to the devices list or didn't implement it correctly. (i've tested the library multiple times and works correctly)

So it is currently one of your best options if you want to support older OS versions.

https://github.com/leolin310148/ShortcutBadger

Also starting with Android 8 you can use the "similar" native option https://developer.android.com/guide/topics/ui/notifiers/notifications.html#Badges

JanBo
  • 2,925
  • 3
  • 23
  • 32