In the documentation for PendingIntent.getService it says it "Returns
an existing or new PendingIntent matching the given parameters".  What
does that mean?

I have one notification which calls
pendingIntent = PendingIntent.getService(context, 0, new Intent
(context, XXXService.class).putExtra("action", 3), 0));
setLatestEventInfo(context, title, text, pendingIntent);

I have another notification which calls
deleteIntent = PendingIntent.getService(context, 0, new Intent
(context, XXXService.class).putExtra("action", 4), 0);

And nowhere else in the code that uses these two actions (3 and 4).

However when I click on the first notification it invokes onStart on
XXXService as expected, but the extra "action" has the value 4, ie the
extra from the second notification.

I'm guessing that PendingIntent.getService returns the same
PendingIntent both times, ignoring the extras the second time.

So how can I have two different notifications with PendingIntents
which invoke the same service but with different extras?

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

Reply via email to