Instantiating an Activity
like this is wrong which is why you get the NPE
HttpClass hc = new HttpClass();
try {
hc.getResultData(result);
This is obviously a separate class so what you want to do is create an interface
to give a callback when the task has finished.
This answer gives an example of using an interface
with your AsyncTask
.
If it were an inner class of your Activity
then you could just call the function directly from onPostExecute()
but if you need it to be a separate file then you will want to follow the example in the link.