Say, if i have to display the content of this blog in my application ,
then
1. I have a UI thread
2. From this UI thread, I should create an intent to call a Service
which would then implement ASynckTask
3. This AsyncTask will make http connection and download any blog
updates, will pass on the update to the UI activity for display.

Please correct me if i am wrong somewhere.

Thanks,
Kacee

On Jul 6, 3:34 pm, Sudeep <[email protected]> wrote:
> Hi Sagar,
>               Use AsycTask class if u want to publish the result or
> response in the UI thread.
> i.e. from the activity u called http connection .
> If you want to listen for any updates say stock value,then use a
> service which is like a background thread
> always running  .almost:)
>
> On Jul 6, 3:12 pm, sagare <[email protected]> wrote:
>
>
>
> > Hi All,
>
> > Thanks for your replies AsynTask seems to be what I should use but I
> > am still not clear with the difference between service and Thread for
> > Http communication.
>
> > Thanks,
> > Sagar
>
> > On Jul 6, 12:43 am, Frank Weiss <[email protected]> wrote:
>
> > > Only people who want to punish themselves use Java threads on Android:-)
>
> > > But you also asked about Service. You can use an AsyncTask in an
> > > Activity if the task has to happen while the activity is active. If
> > > the task needs to happen also when the acitivity is not active, (like
> > > when the user goes to other activities while the task is downloading
> > > stuff) use an AsyncTask in a Service.- Hide quoted text -
>
> - Show quoted text -

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

Reply via email to