–Edit on 23 Apr 2016–
I finally use ShortcutBadger for most of the Device, I think that should be enough for me.
Basically, Shortcut Badger will send broadcast, intent, etc to specific launcher, such as LG Launcher, to make a badge. It may not cover all the launchers but at least it works for the most recent smart phones.
What I am seeing on LG G2 (4.4), there is a number of some of the Apps, e.g. Line, which showing unread count.
This is the application badge I mean and I want to find a way to work that out.
This number will also be notified by the launcher itself, when the app in put inside a folder, the folder will also show the badge.
I think there should have ways to make it work, as I found several apps having badges.
I did a search before and I found that there is a way to make application badge on Samsung and Sony, but what I want is to support other vendor, such as LG and HTC.
IS there an universal way to make an application badge?
Thanks for your help!
Unfortunately, Android does not allow changing of the application icon because it’s sealed in the APK once the program is compiled. There is no way to programmatically change it to a ‘drawable’.
You may achieve your goal by using a widget instead of an icon. Widgets are highly customisable and can do what you want.
Original reference is here
You can also go with Badges library
Stock Android does not offer this functionality at the moment on the standard launcher.
Certain manufacturers (e.g. Samsung notably, HTC, LG, Mi) have included this functionality into their customized Android launchers. Also some 3rd-party launchers (e.g. Nova Launcher) have included an API to accomplish this.
You may want to check following links for further explanation:
- How does Facebook add badge numbers on app icon in Android?
- Does Samsung modifies it’s Android ROMs to have badges on email and SMS icons?
- How to make application badge on android?