There is something called Handler through which you can communicate with
your UI thread
http://www.developer.com/java/j2me/article.php/10934_3762056_3/Handling-Lengthy-Operations-in-Googles-Android.htm

hope this helps

On Fri, Apr 9, 2010 at 1:58 PM, HippoMan <[email protected]> wrote:

> OK. Thank you.
>
> So how do I interface to my UI from the new thread that I start? Once
> the long-running task completes (assuming it finishes before my time-
> out period), I want to notify my UI thread so it can take appropriate
> action. If this was a short-running task, I could have easily used the
> onPostExecute() method of AsyncTask for that purpose.
>
> But when running my own thread, what is the recommended way in Android
> to properly communicate the results of the task to the UI thread? I
> can can think of several ways to do this, but I'm sure there is a
> procedure for this which is consistent with Android "best practices".
>
> Thanks again.
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

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