Hi Mark,

I am facing problem in having single icon on status bar with number of
particular notification occurrence.

ex: ICON(3)... i made below changes... the number is coming but again
multiple icons are coming up.

What I have to need to achieve single icon and number of notification
on the status bar?

if(count == 1) {
                  pendingIntent = PendingIntent.getBroadcast(mContext,
0, intent, 0);
                  n.setLatestEventInfo(mContext, title, caption,
pendingIntent);
            } else {
//                  intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP |
Intent.FLAG_ACTIVITY_CLEAR_TOP);
//                  pendingIntent = PendingIntent.getActivity(mContext,
0,intent,PendingIntent.FLAG_UPDATE_CURRENT);
//                  pendingIntent =
PendingIntent.getBroadcast(mContext, 0, intent,
penndingIntent.FLAG_UPDATE_CURRENT|);
                    pendingIntent =
PendingIntent.getBroadcast(mContext, 0, intent, 0);
                    n.setLatestEventInfo(mContext, title,
caption.replaceAll("%s", Integer.toString(count)),pendingIntent);
            }

Thanks
Gururaja B O
On Feb 18, 6:17 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> Petroleum Nasby wrote:
> > I need multiple notifications to appear in the dropdown notifier window.
>
> That's not a good idea in general.
>
> > But when I add multiple notifications, multiple icons appear in the
> > status bar.
>
> Correct. That's part of the reason why that's not a good idea in general.
>
> I only advise this if the notifications are substantially different. For
> example, having onenotificationper unread email message is a poor UI.
> Having onenotificationfor unread email and onenotificationfor unread
> Twitter messages is better, though of uncertain value to the user.
>
> > It
> > is possible to have a red number overlaid on the icon, but in order to
> > do this,
> > one must apparently overwrite earlier notifications, losing that needed
> > information.
>
> What "needed information"?
>
> > How do I have multiple notifications represented by a single overlaid
> > red number on
> > one icon, which matches the number of notifications in the dropdown,
> > without losing them?
>
> You can't. The number of icons in the status bar will match the number
> of icons in thenotificationdrawer ("dropdown").
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to