views:

101

answers:

1

Hi, could anyone advise on the following: I'm trying to execute code from Android's help page, but it doesn't work for me:

public class DownloadFilesTask extends AsyncTask<String, Integer, Long> {
        protected Long doInBackground(String... urls) {
            Log.e("TuneWiki", "Exec");
            return 1l;
        }

        @Override
        protected void onPostExecute(Long result) {
            Log.e("TuneWiki", "Post");
        }
}

when I execute task, doInBackground is invoked fine, but onPostExecute is never invoked :(

Tested on Milestone with 2.1 OS

+3  A: 

Thanks everyone - I found the reason. AsyncTask ceases working for some reason if a lot of threads were started before even if all threads were successfully completed.

Artem