1

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?

Community
  • 1
  • 1
kvh
  • 2,118
  • 19
  • 29
  • 2
    This may help: http://stackoverflow.com/questions/18285155/how-to-display-unread-count-to-the-android-app-icon – ashatte Oct 09 '13 at 03:55
  • Thanks a lot , but I don't think it is a widget~ – kvh Oct 09 '13 at 04:05
  • Have you tried this one? http://stackoverflow.com/a/15249542/802421 You probably need to have fixed number of icons though (e.g. 1, 2, 3, 3+). – user802421 Oct 09 '13 at 04:45

2 Answers2

2

check out this library: https://github.com/leolin310148/ShortcutBadger

usage is very simple:

  1. Add mavenCentral to your build script.

    repositories {
        mavenCentral()
    }
    
  2. Add dependencies for ShortcutBadger, it's available from maven now.

    dependencies {
        compile 'me.leolin:ShortcutBadger:1.1.3@aar'
    }
    
  3. Add the codes below:

    int badgeCount = 1;
    
    ShortcutBadger.with(getApplicationContext()).count(badgeCount);
    
  4. If you want to remove the badge

    ShortcutBadger.with(getApplicationContext()).remove();
    

    or

    ShortcutBadger.with(getApplicationContext()).count(0);
    
fire in the hole
  • 1,171
  • 15
  • 34
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.

Porwal
  • 330
  • 5
  • 18