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 <treking...@gmail.com> wrote:
> On Tue, May 10, 2011 at 11:40 AM, Boozel <boozelcl...@gmail.com> 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 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



-- 
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 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