Also here are some previous notes I have collected on pending intents Quick intro to pending intents: http://www.satyakomatineni.com/item/3301
How alarmmanager and pending intents interact http://www.satyakomatineni.com/item/3503 At this later link there is a lot of discussion on how pending intents are unique and what happens extras etc. You will also see links to a number of useful posts on pending intents. On Tue, May 10, 2011 at 1:36 PM, Satya Komatineni <[email protected]> wrote: > There is enough material on this forum if you search with 'pending > intent' especially around its uniqueness criteria. > > At a high level, pending intents are references to already stored > intents. A pending intent uses the input intent as a key to locate > previously established pending intent for this intent. The key to > locate this does not include the "extras". All other parts of an > intent participate in this uniqueness. > > So even if you set extras different on 10 different intents > (everyother part of an intent being same) will result in a single > pendingintent. > > The flag that was suggested will retreive that previous intent and > replaces the new extras on the old one. > > You can also use something called a "requestid" to make the intents > unique. But it is suggested in the docs that you don't want to create > a lot of pendign intents if you have other ways of solving it. > > Hope this brings a bit more background to pending intent > > > On Tue, May 10, 2011 at 12:58 PM, TreKing <[email protected]> wrote: >> On Tue, May 10, 2011 at 11:40 AM, Boozel <[email protected]> wrote: >>> >>> however in the service intent.hasExtra("a") is always false. why? does >>> this not work for pending intents? How can I pass a a value between the two? >> >> Try >> this: http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT >> >> ------------------------------------------------------------------------------------------------- >> TreKing - Chicago transit tracking app for Android-powered devices >> >> -- >> 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 > > > > -- > Satya Komatineni > http://www.satyakomatineni.com > http://www.androidbook.com > -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.com -- 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

