**Updated: (See below)**I have been looking around for couple of days and can\'t find a straight answer to this. Some say it possible to some say to accomplish some say it\
I would like to answer that follow up question i.e.
I have a follow up question: Using the above code, is it possible to return a value from the onPostExecute method back to the main class, somehow? (Sorry about beeing noobish) I have tried something like this:
String result = new AsyncClass(this).execute();
I did this in my code it worked.
AsyncClass ac=new AsyncClass();
ac.execute("");
String rslt=ac.get();
Call this code wherever you want to.
public class AsynchClass extends AsyncTask
{
public String result=null;
@Override
protected void onPreExecute() {
// TODO Auto-generated method stub
}
protected String doInBackground(String... params)
{
// Do all your background task here
return result;
}
@Override
protected void onProgressUpdate(Integer... values) {
}
protected void onPostExecute(String result) {
}
}