1

I am using Google's Push notification and I want to show the number of notification in the notification icon, instead of showing the multiple notifications. Something like this -

enter image description here

Is there a method or something in the Notification Class for android?

nasaa
  • 2,701
  • 8
  • 47
  • 76
  • 1
    This link might help you [Notification][1] [1]: http://stackoverflow.com/questions/6381157/how-to-count-number-of-notification-and-display-single-icon-in-android – Rajeev N B Oct 04 '12 at 11:18
  • Thanks RShetty01. It looks like it has the answer for me. I will try ths later today. – nasaa Oct 04 '12 at 11:30

2 Answers2

0

the Notification class should be used for displaying notifications on the top bar (like the Gmail notifications). From what I understood, you can just use a normal TextView applying some styles to make it look nice and place it inside your screen.

Alécio Carvalho
  • 13,481
  • 5
  • 68
  • 74
0

You can select the icon you will display when the notification is created. With .setsmallIcon() I think.

I also encourage you to implement bigtextviews for JellyBean. NoficationCompat2 is a good library to manage this elegantly on different Android versions.

Teovald
  • 4,369
  • 4
  • 26
  • 45