I need to reach a JSON hosted somewhere on the web, retrieve it and manipulate it. To do this, I know it's recommended to implement a handler class to help with the JSON calls and all but I cannot remember the how-to. I do remember you could do it extending AsyncTask and using String, Void and JSONObject as the wildcards, you know, like this:
public class JSONhandler extends AsyncTask <String, Void, JSONObject>{
//code here
}
I would like to do this strictly by extending AsyncTask<>. I'm aware this question addresses the use of AsyncTask but that's not how I'm looking for it. That question's code extends Activity, and I do not which this class to be an Android Activity, I wanna implement this class in an Android Activity.
The thing is I do not remember the how-to.
Thanks in advance.