info+fram Use different request codes each time in PendingIntent.getActivity, the documentation is bugged and say this is not in use but they DO work. There is an old discussion on this one: http://groups.google.com/group/android-developers/browse_thread/thread/ad855bb57042c2bd/ee143afcddd65982?hl=en&lnk=gst&q=pendingintent+request+code#ee143afcddd65982
On Mar 22, 11:25 am, "info+farm" <bilgiciftl...@gmail.com> 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 -~----------~----~----~----~------~----~------~--~---