0

i need to display notification icon on app icon. like iphone. in iphone on gmail or fb new incomming messges or dispalyed on appicon. in andriod also gmail widget it is displaying new mails count on icon? thanks in advance.

Taylan Aydinli
  • 4,130
  • 15
  • 36
  • 32
madhu kotagiri
  • 415
  • 3
  • 14

1 Answers1

2

Android does not allow changing of the application icon because it's sealed in the APK tightly once the program is compiled. There is no way to change it to a 'drawable' programmatically. But there are some ways. You may achieve your goal by using a widget instead of an icon. Widgets are customisable. Please read this :http://www.cnet.com/8301-19736_1-10278814-251.html and this http://developer.android.com/guide/topics/appwidgets/index.html. Also look here: https://github.com/jgilfelt/android-viewbadger. It can help you.

But i want to say it is a BAD practice. App's Icon Notification badge is an iOS pattern and it should not be used in Android apps anyway. In Andrioid there is a status bar notifications for these purposes:http://developer.android.com/guide/topics/ui/notifiers/notifications.html And if Facebook or someone use this it is not a common pattern or trend we should consider.But if you insist anyway and don't want to use home screen widgets then look here, please:

How does Facebook add badge numbers on app icon in Android?

As you see this is not an actual Facebook app it's TouchWiz. In vanilla android this can be achieved with Nova Launcher http://forums.androidcentral.com/android-applications/199709-how-guide-global-badge-notifications.html I hope this will clarify some things for you.

You can also do this

Community
  • 1
  • 1
Sanket Shah
  • 4,331
  • 3
  • 18
  • 37