On Sat, Oct 30, 2010 at 3:14 PM, Bret Foreman <[email protected]> wrote:
> I have an IntentService that broadcasts an Intent each time if
> finishes some work. Each broadcast Intent is identical except that it
> contains a Bundle with some result information from the IntentService.
> Evidently, having different data in the Bundle is not enough for
> Android to think it's a different Intent.

Correct.

> If the IntentService
> broadcasts two of these Intents back-to-back, the second one is
> dropped as a duplicate.
>
> I know I've read about this behavior in this forum in the past but I
> can't find in the documentation where this duplicate elimination logic
> is described in detail. Mostly, I just want to differentiate the
> Intents enough that they are not considered duplicates. Any pointers
> would be appreciated.

I believe that Android uses filterEquals() on Intent to determine if
two Intents are equivalent for this purpose. From the documentation:

"Determine if two intents are the same for the purposes of intent
resolution (filtering). That is, if their action, data, type, class,
and categories are the same. This does not compare any extra data
included in the intents."

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 2.2 Programming Books: http://commonsware.com/books

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