I am sending data to web server using asynctask task class. So I am taking all value from SQLite in one array list and in for loop I'm calling asynctask class to send data but the problem is loop finishes its execution and send only last value from array list to the web service. But the web service is calling according to for loop.
Any suggestion would be helpful.
Following is my code:
for (int i = 0; i < outletMasterList.size(); i++) {
outletMaster = outletMasterList.get(i);
outlet_Code = outletMaster.getOutletCode();
outlet_UID = outletMaster.getOutletUID();
finalValue = AppConstant.IMEI_NUMBER;
System.out.println("Sync i : : : : " + i + " " + respose_count);
new CommonAsyncTaskWithoutProgressBar(Sync.this, callbackInterface)
.execute("0",
AppConstant.NAMESPACE,
AppConstant.METHOD_NAME,
AppConstant.ACCESS_KEY,
AppConstant.Set_OutletFromHH,
AppConstant.OutletSyncParameters, finalValue);
}