I have read that an AsyncTask keeps running even if the calling activity has stopped. Keeping this in mind, I am trying to understand the working of onTaskCompleted. onTaskCompleted is usually called from onPostExecute() of the AsyncTask and if the calling activity still exists, everything is good. But what if the calling activity has stopped? Will this result in a crash of the app?
This question came to me because I was thinking of updating some global variables or UI components in the calling activity on the result of the AsyncTask. Is this a good idea? Won't this also result in a crash?
Thanks.