Friday, April 29, 2011

[android-developers] Re: problem with asyntask

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:
>
> http://developer.android.com/reference/android/os/AsyncTask.html#onPo...)
>
> The Result is whatever is returned from AsyncTask1.doInBackground().
>
> -- Kostya
>
> 29.04.2011 10:56, 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<flyingdutc...@gmail.com>  wrote:
> >> 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 wait.
> >> If you need a larger pool of threads, use the method *public final
> >> AsyncTask<Params, Progress, Result>  executeOnExecutor (Executor exec,
> >> Params... params) *to execute your background tasks.
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment