[android-developers] Re: @ Android-Dev-Team: Request for AsyncTask.getThread() method

2009-06-16 Thread Sven Bendel
Thanks for the fast answers! Unfortunately I found out, that I can't use AsyncTask for my task anyway... The get() method seems to provide a neat way to pseudo-join the AsyncTask and the main UI-thread - I found it yesterday evening, too, and played around with it a little bit. The only problem

[android-developers] Re: @ Android-Dev-Team: Request for AsyncTask.getThread() method

2009-06-16 Thread Sujay Krishna Suresh
instead of joining threads... u need to use a handler and a thread... n keep sending msgs from the thread to the handler... the handler jus reads the message say for the amt of progress n updates d progress bar accordingly... i think this mght help u... jus try it out... On Tue, Jun 16, 2009 at

[android-developers] Re: @ Android-Dev-Team: Request for AsyncTask.getThread() method

2009-06-16 Thread Dianne Hackborn
How about copying the AsyncTask code into your app and modifying to do what you want? I think this is a lot cleaner than going to contortions to work around the API to use it in ways that probably aren't intended. On Mon, Jun 15, 2009 at 11:32 PM, Sven Bendel ben...@cs.uni-bonn.de wrote:

[android-developers] Re: @ Android-Dev-Team: Request for AsyncTask.getThread() method

2009-06-15 Thread Mike Hearn
AsyncTask uses a thread pool behind the scenes, and assumes it has control over the threads. I don't think it's a good idea to join them, etc. There is a get() method that lets you wait for the computation to complete. Is that what you want? You have to make a thread sleep in the context of

[android-developers] Re: @ Android-Dev-Team: Request for AsyncTask.getThread() method

2009-06-14 Thread Streets Of Boston
You could call setAsyncThread(Thread.currentThread()) inside/during the AsyncTask's doInBackground method, likely at the start of the doInBackground. You'd create the public and synchronized methods setAsyncThread and getAsyncThread yourself as part of the AsyncTask's subcllass. On Jun 14, 7:14