You would be better off just creating your own thread and handling the timeout inside it.
On Fri, Apr 9, 2010 at 11:16 AM, HippoMan <hippo.mail...@gmail.com> wrote: > Of course I know about cancel(). When I mentioned the use of "get(long > timeout, TimeUnit unit)", I thought it would be obvious that I would > then invoke cancel() to terminate my overly-long-running task. But > then, my UI thread would block while I'm waiting, as I stated above, > which is not desirable. Nor is the fact that the done() method of > AsyncTask's contained FutureTask object also calls get(). > > I asked what is the Android-approved, canonical method for doing what > I want to do. Given that AsyncTask is not the intended mechanism for > invoking and optionally timing out a long-running task, what *is* the > recommended method for doing so in Android? > > Thanks again, in advance. > > > -- > 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+unsubscr...@googlegroups.com > 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. > -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en