81368

progress bar in appwidget for a playback service

Question:

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?

Answer1:

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

Recommend

  • How To Draw More Precise Lines using Core Graphics and CALayer
  • Shift operation implementation in java
  • Benefits of using a CSS framework [duplicate]
  • How to connect to a GitHub repo using libgit2?
  • How to have NHibernate persist a String.Empty property value as NULL
  • can't get In-App-Purchase hosted content to be actually hosted
  • Why isn't RAD (Eclipse) able to properly detect WAS server startup?
  • Composer error [UnexpectedValueException]
  • Update SQL MS Access 2010
  • Does SmartGit support git-svn?
  • dismiss Progress Dialog in another Activity … Android
  • custom string delimiters stringtemplate-4
  • How to synchronize two scrollview in Android?
  • Is it safe to drop the -webkit vendor prefix from the css3 border-radius yet?
  • What is this strange character in chrome's resource css viewer?
  • How do you create a Fuseki SPARQL server using the Apache Jena Java API?
  • How to repeat sections of a SQL query across UNIONs? (DRY in SQL)
  • Are there any side effects from calling SQLAlchemy flush() within code?
  • SIP API media codecs
  • Specifying Castle WCF Integration Facility Endpoint Behavior per Endpoint
  • How can the INSERT … ON CONFLICT (id) DO UPDATE… syntax be used with a sequence ID?
  • Google Custom Search with transparent background
  • Android fill_parent issue
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Nant, Vault & Windows Integrated Authentication
  • Different response to non-authenticated users and AJAX calls
  • C# - Serializing and deserializing static member
  • Is there a amazon webstore API for customers?
  • Bug in WPF DataGrid
  • Resize panoramic image to fixed size
  • Incrementing object id automatically JS constructor (static method and variable)
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • jQuery tmpl and DataLink beta
  • Do create extension work in single-user mode in postgres?
  • How can I estimate amount of memory left with calling System.gc()?
  • Circular dependency while pushing http interceptor
  • File upload with ng-file-upload throwing error
  • Python: how to group similar lists together in a list of lists?
  • Angular 2 constructor injection vs direct access
  • Understanding cpu registers