开发者

android: widget: service:: How to update widget and activity control's text/image from service

I have service, widget and activity....widget and activity both have one textview which should display same string. String is produced by service.

Is there any way to update both using single command or message from servi开发者_JS百科ce?

Does RemoteView usefull in this, How? Any links to example ?


Create a broadcast receiver in the activity. When the service gets the string, creates intent with the string, ACTION, and sends it to all listeners.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜