Nivek wrote:
> 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).

http://android-developers.blogspot.com/2009/04/introducing-home-screen-widgets-and.html

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:

http://github.com/commonsguy/cw-advandroid/tree/master/AppWidget/TwitterWidget/

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

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to