jeudi 7 avril 2016

Best ways to call Multiple Async task Fetch Data from Server to Local in android

1.In my android App more than 10 Asynctask is Available.

2.its using for Fetching Data from Server to Local DB.

i kept Async task in the Separate Class.

So Can i call Simultaneously Like mentioned Below. It will Create any Problem, While Syncing and Inserting in Local Database or else Suggest me any other Solution.

MY CODE:

  if (isInternetPresent) 
{

    new AsyncTaskSync_MappingTableClass1(MainActivity.this).execute();

    new AsyncTaskSync_MappingTableClass2(MainActivity.this).execute();

    new AsyncTaskSync_MappingTableClass3(MainActivity.this).execute();

    new AsyncTaskSync_MappingTableClass4(MainActivity.this).execute();
    }
    else
    {
    Log.i("INFO"," No Internet.. :-(");
    }

Aucun commentaire:

Enregistrer un commentaire