[Solved] How to execute the asynchronous task several times?


You can iterate through the list size and call asynchronous task in that.

for(int i=0; i<list.size();i++)
{
     // Call AsyncTask with any value you want to pass
     // just generate a constructor accordingly

     new AsyncTask(i).execute();  
}

And get the value in AsyncTask class with required constructor :

 public class AsyncTask{

        Integer position;
        public AsyncTask(Integer passedValue)
        {
            position = passedValue;
        }
    }

Hope it helps ツ

1

solved How to execute the asynchronous task several times?