在appwidget进度条播放服务 [英] progress bar in appwidget for a playback service

查看:203
本文介绍了在appwidget进度条播放服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在显示从后台服务播放进度的appwidget显示进度条。我知道appwidget支持控制,但我不知道我怎么会去更新的方式,是一种具有良好部件的设计(例如极低的电池消耗量)一致的进度条。我通常会做一个活动的方法是通过查询一个计时器播放。我还没有实现这个,所以我甚至不知道这是否会在appwidget工作。任何人都知道的比我好?

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?

推荐答案

有服务更新的应用程序widget的 RemoteViews 时,有足够的时间已经过去了,使其值得更新。

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

这篇关于在appwidget进度条播放服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆