开发者

Send data from Service to Widget on Android

开发者 https://www.devze.com 2022-12-28 04:56 出处:网络
I am writing a widget on Android 1.6 that shows the minutes that a person has used on the current month.

I am writing a widget on Android 1.6 that shows the minutes that a person has used on the current month. The way I have it setup is by having a service that listens to the state of the phone and when the phone is picked up, it starts the timer and whe开发者_运维问答n the person hangs up, ends a timer. I would like to send this variable(long duration) over to my appWidgetProvider so I could update the edit text on it.


I'm no expert, but the AppWidgetProvider is the one that starts the service, right? Why not simply give a reference to the AppWidgetProvider upon creation of the service?

0

精彩评论

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

关注公众号