Dear all,

Am I the only one who is having this problem?
Actually, I am going to find a workaround for this problem, but I
would like to know what I am doing wrong.

Any help would be appreciated.

Regards,
info+farm


info+farm wrote:
> Hello all,
>
> I have more than one notification in notifications area and each of
> them has the same intent with different extras in it. Once I start() a
> pending intent from the notifications, first intent is handled
> correctly and the extras received successfully on the next(called)
> activity. Nonetheless, if I go with the other notifications with
> different extras, activity is resuming but rather than containing my
> new extras it still has the first(old) values.
>
> I played with the flags on intent but as far as I see notification is
> always calling the intent with FLAG_ACTIVITY_NEW_TASK flag set. If I
> do the same coding with Intent(rather than PendingIntent) everything
> goes well.
>
> Here is the code that I tried;
>                               PendingIntent contentIntent = 
> PendingIntent.getActivity(this, 0,
>                                               new 
> Intent(Weather.GET_WEATHER_ACTION).
>                                               putExtra("package.prefix.tmp", 
> 1).setFlags
> (Intent.FLAG_ACTIVITY_NEW_TASK), 0);
>                               try {
>                                       contentIntent.send();
>                               } catch (CanceledException e) {
>                                       e.printStackTrace();
>                               }
>
>                               PendingIntent contentIntent = 
> PendingIntent.getActivity(this, 0,
>                                               new 
> Intent(Weather.GET_WEATHER_ACTION).
>                                               putExtra("package.prefix.tmp", 
> 2).setFlags
> (Intent.FLAG_ACTIVITY_NEW_TASK), 0);
>                               try {
>                                       contentIntent.send();
>                               } catch (CanceledException e) {
>                                       e.printStackTrace();
>                               }
>
> 1 is received in first call but in the second call 1 is received again
> rather than 2.
> I think I am missing something on the life cycle of the PendingIntent,
> any help/idea would be appreciated.
>
> info+farm
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to