2
I’m wearing a AsyncTask
(Android app) to receive a string json
from the server (Comes from a controller on 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 the onPostExecute
I send information where it is needed and start several activities (depending on what was requested from the server). The problem is when the answer takes time and I start one more AsyncTask
on top. How can I know if there is a task going on, and if it is running, how to cancel it?