[android-developers] Re: problem with asyntask

2011-04-29 Thread ABSOLUT
Sorry. My english is limited. I try to pura an example. Asyntask1 (When asyntask 1 finish depending of boolean result) If asyntask result is true execute asyntask 2 If asyntask result is false execute asyntask 3 These is what I want Many thanks On 29 abr, 02:48, Streets Of Boston

Re: [android-developers] Re: problem with asyntask

2011-04-29 Thread Kostya Vasilyev
You should be able to start AsyncTask2 or AsyncTask3 in AsyncTask1's onPostExecute: http://developer.android.com/reference/android/os/AsyncTask.html#onPostExecute(Result) The Result is whatever is returned from AsyncTask1.doInBackground(). -- Kostya 29.04.2011 10:56, ABSOLUT пишет: Sorry.

[android-developers] Re: problem with asyntask

2011-04-29 Thread ABSOLUT
Many thanks like always Kostya Vasilyev , you're a Guru It works!. I thoght that these could't do it. On 29 abr, 12:49, Kostya Vasilyev kmans...@gmail.com wrote: You should be able to start AsyncTask2 or AsyncTask3 in AsyncTask1's onPostExecute:

[android-developers] Re: problem with asyntask

2011-04-29 Thread Streets Of Boston
You could also have just one AyncTask doing all three tasks... ... public Result doInBackground(Param parm) { boolean result1 = callSomeTask1(); if (result1) { callSomeTask2(); } else { calSomeTask3(); } } private boolean callSomeTask1() { ... ... } private

[android-developers] Re: problem with asyntask

2011-04-28 Thread Nicholas Johnson
I'm having trouble understanding your problem. From your post, you have 2 AsyncTasks. Launching task B depends upon the result of task A. So, the tasks will run sequentially by design. Is there a specific error that this scenario is generating an error for you? That is, are you having a

[android-developers] Re: problem with asyntask

2011-04-28 Thread Streets Of Boston
I think you mean that one asynctask's background process has to finish before another asynctask's background process can start. This is per design in pre-Donut and in Honeycomb and later. All AsyncTasks use a pool of only one thread. If one asynctasks is 'using' it, others can't and have to