Friday, December 10, 2010

[android-developers] Re: Regarding using condition in Service

You do realize that services run on the main UI thread by default?
You're not gaining anything by having this code in a service because
it can block the activity which is running on the same thread, and you
can't pass the results back directly to the calling activity. You
might as well run your HTTP request in an AsyncTask, ask the user to
please wait, and report the results when it's done. Unless, of
course, you really do need a service for some reason.

Doug

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate