java - Android : How to Pass the JSON object From AsncTask class to the Main Class -
i have jsonobject receiving api call within asynctask class. want pass json object mainactivity class show jsonobject data in gui. found solutions throughout searches , came close solution. when access mainactivity class says jsonobject null. have dont wrong here? best way ? following asynctask class import android.content.context; import android.os.asynctask; import android.util.log; import org.apache.http.httpentity; import org.apache.http.httpresponse; import org.apache.http.client.httpclient; import org.apache.http.client.methods.httpget; import org.apache.http.impl.client.defaulthttpclient; import org.apache.http.util.entityutils; import org.json.jsonobject; /** * created nisal on 13-sep-17. */ public class getstationsapicall extends asynctask<string, void, jsonobject> { context ctx; jsonobject responseobj; string result; public interface asyncresponse { void processfinish(jsonobject output); } public asyncresponse deleg