I have an async task that does a HTTP GET request and grab a JSON response. I call it like this in the onCreate method to grab the information from the server in the doInBackGround method.
myTask.execute(new String[] {firsturl});
I want to wait until this is over and grab another JSON response from a different URL in the onCreate method. I don't necessarily need to wait until the above asynch task process is done, but I would like to reuse to code. So I did;
myTask.execute(new String[] {secondurl});
This gives me the error that the first task is still running. How do I call the same asynch task twice in the onCreate method?
thanks!