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
updates.

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


 


 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 

--


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 !

Kevin






--



Other Threads

1. Android Developer / SDK

Hi Guys/Girls,

I just wanted to reach out. I read the TOS here, and believe this post/
discussion falls within the rules, but be quick to let me know if not.
I am not here to disturb anyone. We are simply looking for an Android
developer that is willing to work in Tampa, FL. We have a few
positions open now, and it is a critical need. Our rates are open TO
AN EXTENT, but we are willing to work with people that have experience
in doing Android development, and not just {*filter*} work. Actual
hands on work experience in a mid-large shop would be best.

Thank you,

Breece Lynn
bl...@vereduscorp.com

-- 

2. Android Market

So how do we get involved in the Android Market?

I'd be interested in making our application available for the launch.

--Scott Thibault

--~--~---------~--~----~------------~-------~--~----~

3. How to get notification of sms thread creation / deletion?

4. Apn Setting Insert Problem

5. Authenticate Non-AppEngine Webservice using Google Account

6. Exception in Klasse ListPreference.java mit excerciser monkey

7. Jsoup