I want to show notification number icon in Android application launcher icon. I read about widgets.But how can I show that widget instead of application icon.
Asked
Active
Viewed 3,912 times
1 Answers
1
Here is a way to change launcher icon. You can use it for your purpose.
How to change an application icon programmatically in Android?

Community
- 1
- 1

Maxim Efimov
- 2,747
- 1
- 19
- 25
-
But how it changes the icon. Sorry i didn't get the code – user1767260 Jul 30 '13 at 06:07
-
@user1767260 as far as I can understand, you should enable one activity alias at time, so the one with needed icon is used as "MAIN" and is is been shown as launcher icon – Maxim Efimov Jul 30 '13 at 06:10
-
What is this .MainActivity-Red in the code – user1767260 Jul 30 '13 at 06:24
-
@user1767260 it is an activity-alias name – Maxim Efimov Jul 30 '13 at 06:27
-
But where it is changing the launcher icon. Suppose if i get a notification from GCM.How can I show that in my launcher icon – user1767260 Jul 30 '13 at 06:29
-
@user1767260 you create two activity-alias, one with "has notification" icon and one with "no notification". Then, after message is recivied you enable the first one and disable the second. I think it should work. – Maxim Efimov Jul 30 '13 at 06:35
-
In this case I can display only two icons but I want to show the number of notification in the icon.So according to this i have to create a number of alias for showing the count.right? – user1767260 Jul 30 '13 at 06:38
-
@user1767260 I think yes - that's the limitation of this approach. – Maxim Efimov Jul 30 '13 at 06:40
-
Thank you.But it very difficult to implement in my case – user1767260 Jul 30 '13 at 06:43