Carl wrote:
> I would like to update my AppWidget only, without interfering with the
> other widgets in the system.
> I created the following code, but I am not sure it other widgets will
> also update, since I am using Context.sendBroadcast().
> 
> Intent myWidgetUpdate= new Intent
> ("android.appwidget.action.APPWIDGET_UPDATE");
> myWidgetUpdate.setClassName("com.package.name",
> "com.package.name.mywidget");
> sendBroadcast(myWidgetUpdate);
> 
> In the reference it is written:
> 
> sendBroadcast(Intent intent, String receiverPermission)
> Broadcast the given intent to all interested BroadcastReceivers...
> 
> Does this means that even if I specify the exact class to send the
> intent to, other unrelated widgets will also be udpated?

Why not just:

-- bind to the IntentService that is supporting your widget and call a
method on there to update to widget? Or

-- create your own Intent that your AppWidgetProvider listens to in
addition to the official one, and broadcast that custom Intent?

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

_Android Programming Tutorials_ Version 1.0 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en

Reply via email to