How to update widgets from a service?

Posted by Franklin on Stack Overflow See other posts from Stack Overflow or by Franklin
Published on 2010-05-15T01:08:48Z Indexed on 2010/05/15 1:14 UTC
Read the original article Hit count: 262

Filed under:
|
|

I have a background service that can be configured to perform some action every x minutes. I want to implement a widget that gets updated every time my service performs that action. However, I can't get the onUpdate method of my AppWidgetProvider called in any way, except when adding a widget to the homescreen.

I tried sending APPWIDGET_UPDATE intents but onUpdate did not get called although the AppWidgetProvider did receive the intent since the onReceive method was called. Is there any way I can trigger widget updates from a service?

© Stack Overflow or respective owner

Related posts about android

Related posts about widget