6

Does anyone know how to accomplish adding to my application's launcher icon the circular badge with a number inside of it (indicating number of unread emails) like the HTC mail application does? I know how to do this for notifications, but not for the launcher icon.

To clarify, it's not a widget, but an application icon.

Charles
  • 50,943
  • 13
  • 104
  • 142
Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246
  • 1
    That isn't a default Android behavior (if you are talking about adding a number like unread to the icon).. Does the rom you are running have custom chrome like sense ui, or motoblur? – Quintin Robinson Sep 15 '10 at 19:33
  • It doesn't do that on my N1 (CM6), and I don't think it would be possible anyway, icons are hard-baked into the app, I've never seen any way of changing it dynamically. Are you sure it isn't a widget? – fredley Sep 15 '10 at 19:43
  • 1
    First, I'm using the HTC EVO 4g with Android 2.2, so it does have some UI customization. Second, I apologize, I thought gmail's icon did it too, only HTC's mail icon does this. I'm fairly sure it's not a widget, unless there's some way to fake out the OS to insert a widget when the user inserts an app shortcut on the desktop. Regardless, the icon-sized "widget" isn't even available in the HTC mail widget list. So I guess the answer is that this is custom behavior that would be painful to implement, yes? – Jeff Axelrod Sep 16 '10 at 02:54
  • 2
    It sounds like custom behavior that HTC has hacked into the OS – Daenyth Sep 16 '10 at 16:05
  • HTC might even ship their own built OS - I know Garmin does (did). – mobibob Feb 09 '11 at 01:10

2 Answers2

3

I'm posting Daenyth's answer so I can mark this as answered:

@glenviewjeff: It sounds like custom behavior that HTC has hacked into the OS [launcher].

Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246
  • Both HTC and Samsung have added this custom behaviour: [http://stackoverflow.com/questions/6864184/how-do-i-set-up-htc-sense-and-samsung-touchwiz-app-icon-badges/14055329] – KevinD Jan 22 '13 at 10:11
1

What you want is a widget, not an icon. Icons are static. You can find out more info here: Introducing home screen widgets and the AppWidget framework

Daenyth
  • 35,856
  • 13
  • 85
  • 124