Mafian911 wrote:
> Thanks for your reply. I do know how to update a widget when the user
> interacts with it, for example, when a user presses a button on the
> widget itself. I wanted to know if it is possible to update a widget
> from *outside* the AppWidgetProvider class, say, from a broadcast
> receiver that is examining text messages, for example.
>
> Is there a way to load an Intent up with the necessary information and
> broadcast it in such a way that it will cause a widget to update?

Sorry, I didn't make my earlier point clear.

An AppWidgetProvider is a BroadcastReceiver.

That gives you two possibilities right off the bat:

1. Have it also handle whatever other Intents you were planning on
setting up with a separate BroadcastReceiver, or

2. Send an Intent from whatever component you want to the AppWidgetProvider.

In other words, don't worry about trying to talk directly to the app
widget (which I suspect is impossible) -- just talk to your code that
already talks to the app widget.

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

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