On Thu, May 19, 2011 at 3:57 PM, Droid <[email protected]> wrote:

> I having problems with two threads - often I cannot even turn them off or
> keep the timer going without upsetting the apple cart.
>

Just saying you're using two threads is a red flag. What apple cart?


> Should I start using wait() and notify(), a separate service or continue
> trying to get them to be friends with each other in the same activity. At
> present its all very badly behaved and I feel as though I am juggling with
> marbles.
>

Use a handler to schedule a message to go off in 5 minutes. When that
message is delivered, use an AsyncTask to do the fetch and handle the
results when it completes.

No raw threads necessary.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

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