I searched from google and found several answers. Some people said samsung touchwiz can do this, see the link
However, I can find the badge icon in Nexus4 with Android 4.2.2.
So, is there any tricks or private API?
I searched from google and found several answers. Some people said samsung touchwiz can do this, see the link
However, I can find the badge icon in Nexus4 with Android 4.2.2.
So, is there any tricks or private API?
check out this library: https://github.com/leolin310148/ShortcutBadger
usage is very simple:
Add mavenCentral to your build script.
repositories {
mavenCentral()
}
Add dependencies for ShortcutBadger, it's available from maven now.
dependencies {
compile 'me.leolin:ShortcutBadger:1.1.3@aar'
}
Add the codes below:
int badgeCount = 1;
ShortcutBadger.with(getApplicationContext()).count(badgeCount);
If you want to remove the badge
ShortcutBadger.with(getApplicationContext()).remove();
or
ShortcutBadger.with(getApplicationContext()).count(0);
Badge icons are possible inside the application - like on different tabs: https://github.com/jgilfelt/android-viewbadger
For Android, It doesn't allow changing of the application icon as it is sealed in the APK while the program is compiled. The way to show notifications for application is only in status bar. Check these links: http://developer.android.com/guide/topics/ui/notifiers/notifications.html and http://e2eapps.com/2010/01/21/android-push-notification-system/
Numbers what you want to display can appear in status bar.