i want to execute two AsyncTask in parallely. Basically I wanted to do when I click on a button you run the two AsyncTask but at the same time are not so ... On the first part click the first to second the second in the order! I would understand if it is possible go start them with the click of a button!
I write below the code that I utilzizato to let her go:
public void onClick(View arg0){
switch(arg0.getId()) {
case R.id.btn_down:
if(isOnline() == true){
//
// new ShowDialogAsyncTask().execute();
new AsynTask2().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,null);
new ShowDialogAsyncTask().executeOnExecutor(AsyncTask.SERIAL_EXECUTOR,null);
}
else{
Toast.makeText(this,"Connettiti a Internet",Toast.LENGTH_SHORT).show();
}
break;
}
}