2011/4/2 Jake Colman <[email protected]>

> Kostya,
>
> Thanks for the detailed reply.
>
> For those events that are shared by the two receivers, what happens if
> only one sized widget is actually on the home screen?  The system sends
> the event and it is still processed by "unused" broadcast receiver even
> though its widget is not instantiated?  That's the behavior I am seeing
> and it sounds like you see the same.
>

For anything other than onUpdate -  widgets are built on top of the
broadcast receiver mechanism, they make use of how receivers work, but don't
change that.

That mechanism doesn't know that there are no widgets of a particular size
on the screen, it just sends those events to all receivers that have
matching intent filters. It doesn't even know (I think) that those receivers
are actually widgets. The home screen app does, but not the intent
dispatcher.

If there are 1337 of those, then all will be invoked. I think it's a safe
guess that with 1338 it works the same way :)


>
> With regard to your statement "Multiple broadcasts haven't been a
> problem with my setup, because my code double checks widget Ids against
> my own known widget Id list for that particular widget size", you still
> get the multiple broadcasts but you are smart enough to ignore them?
>

Yes. I have to track widget Ids on my own, because there is a fairly well
known problem with "stale" ("ghost") widget Ids.

I posted this before, here is my setup:

http://kmansoft.wordpress.com/2010/06/22/per-widget-options-stale-widgets/

 -- Kostya


>
> --
> Jake Colman -- Android Tinkerer
>
> --
> 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
>

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