According to the post below: http://techtej.blogspot.com.es/2011/03/android-thread-constructspart-4.html. It says that:
In such cases, where your application is not shutdown, but any foreground tasks have been closed or changed, all the background tasks need to know of this and try to exit gracefully
To achieve this, I am calling the cancel
function on all the AsyncTask
instances. Is this the right way? Also sometimes in image lazy loading, I don't keep track of all the AsyncTask
s alive (and fetching images), so how to say the Android OS
to cancel them too?