I have two Activity ( mainActivity and downloadActivity ), and I have 2 AsyncTask in downloadActivity
In downloadActivity , it first executes getFileAsyncTask to read the JSON file to add some images and create a ListView from the images, if the user clicks on the image, downloadAsyncTask called, and it starts downloading something from the Internet. My problem is here: when the second AsyncTask , I return to mainActivity and again return to downloadActivity , the first AsyncTask not called until downloadAsyncTask completed
public class downloadActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { ... new getFileAsyncTask().execute(); ... } private class getFileAsyncTask extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... params) {
note: I want to write something like trading applications. For example, a user can upload files and shop at a store to see products.
source share