Okay, I’ve read the Android documentation and been perusing article after article on ASyncTask and just don’t understand how to get information back from my external ASyncTask class. This runs fine:
myASyncTask = new MyASyncTask();
myASyncTask.execute(myParam);
…and I fully expect the task to complete but how do I get anything back from it? The documentation says that onPostExecute is invoked on the UI thread but it also says to not call onPostExecute manually?!? How do I get data back from my ASyncTask object???
I’ve got it to work fine when I create my ASyncTask as an inner class but I’d rather this task be external so I can call it from different Activitys.
If you read the documentation you can use
getmethod to get the result , and it waits till the task is done .You can also use
getStatusto get the current status of the task , assuming it publishes it .