I'm using AsyncTask
(Android App) to get a string json
from the server (Comes from a controller from my ASP MVC site).
Basically everything that comes from the server goes through this class
public class Communications extends AsyncTask<String, Void, String> {
//vários caminhos aqui dentro
}
and in onPostExecute
I send the information where it is needed and start several activities (depending on what was requested from the server). The problem is when the response is delayed and I start another%% of% over. How do I know if there is a task to be done, and if it is running, how can I cancel it?