progress bar in appwidget for a playback service

888 Views Asked by At

I wanted to display a progress bar in an appwidget that displays playback progress from a background service. I know the appwidget supports that control, but I am wondering how I might go about updating the progress bar in a way that is consistent with good widget design (e.g. low battery consumption). The way I would normally do it in an activity would be by polling the playback on a timer. I haven't implemented this yet, so I am not even sure if it would work in an appwidget. Anyone know better than me?

1

There are 1 best solutions below

5
On BEST ANSWER

Have the service update the app widget's RemoteViews when sufficient time has elapsed to make it worthwhile to update.