Reputation: 7291
Currently I notifying user as -
mNotificationManager.notify("My App Name",1212,notification);
This is working nicely. But it shows only one icon in status bar, though I sent multiple notification on different times.
I would like to show icon for each notification (i.e. 3 icons).
I am not sure whether it's possible. Any clue?
Upvotes: 2
Views: 536
Reputation: 1356
try this:
mNotificationManager.notify("My App Name",(int)(Math.random() * 101),notification);
*same id on notification change always the last one
*different id create a new notification
Upvotes: 5
Reputation: 2824
According to notify documentation if you want always the same 3 notifications all the time try using unique tags. It's the combination of tag and id that makes the notification "overwrite" the previous one.
mNotificationManager.notify("My App Name 1",1212,notification);
mNotificationManager.notify("My App Name 2",1212,notification);
mNotificationManager.notify("My App Name 3",1212,notification);
or
mNotificationManager.notify("My App Name",1212,notification);
mNotificationManager.notify("My App Name",1213,notification);
mNotificationManager.notify("My App Name",1214,notification);
Upvotes: 1