AppWidget update best practices

by Nivek » Sun, 08 Nov 2009 16:27:09 GMT

Sponsored Links
 Hi !

In the process of creating an AppWidget which displays data from a
remote host, I am looking for documentation about how to manage

Are there articles somewhere about how and when querrying remote data
is the most appropriate ?

I am wondering if we have to explicitely code the remote querries in a
separate thread, or even do it in a separate service, to avoid freezes
of the home screen (this happens a lot on my htc magic).

Any tip and help is welcome !

Thanks !


AppWidget update best practices

by Mark Murphy » Sun, 08 Nov 2009 21:26:26 GMT 

The above blog post shows using app widgets where the real work is being
done by a separate service.

To have the work be done on a background thread in that separate
service, have your service extend IntentService and override
onHandleIntent() rather than onStart().

You can see an example of this technique here: 

99% of the time, you want to do any sort of "remote queries" on a
background thread.

Mark Murphy (a Commons Guy)  | 

Android App Developer Books: 


Sponsored Links

AppWidget update best practices

by Nivek » Sun, 08 Nov 2009 22:41:05 GMT

 Thanks a lot, this is exactly what I was looking for.

I try this right now !



Other Threads

1. Sync Motorola Droid PIM data without cloud or Exchange?

I'd like to sync PIM data (contact, calendars, etc) from my computer
to my Motorola Droid, without using Microsoft Exchange or Google's
cloud. In other words, I want to sync all data between the two devices
locally. I don't have access to Exchange, and my clients' privacy/
security concerns prevent me from uploading data to Google's cloud.

I'd prefer to sync from Evolution in Ubuntu Linux 9.10, but am willing
to use Windows Vista if necessary.

Thanks in advance for your help!


2. JAVADOC : errors constructing information...


Would anyone know how to configure an ADT Eclipse project to
successfully generate the Javadoc on it ?

Here are my errors when I attempt to run "Generate Javadoc..." on any
Android ADT project :

     Constructing Javadoc information...
     package does not exist
     package android.util does not exist
     import android.util.Log;
     package android.view does not exist
     import android.view.View;
     package android.widget does not exist
     import android.widget.Button;

With thanks,



3. ItemizedOverlay animations on a MapView

4. Re-installing an updated .apk file....

5. Default Map Not Showing Up During Tutorial

6. onClick mouse position

7. Usage of TextView. Append and setText.