0

how can I cancel a running AsyncTaskLoader?

The reference sais, there should be a cancelLoadInBackground() method to cancel a running task, but this method is not available in AsyncTaskLoader?!!

There are two other methods,cancelLoad() and stopLoading(), both do not work for me.

I need to abort the task, if someone switches from the current fragment to another one

Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136

1 Answers1

0

There is a v4 support library version of AsyncTaskLoader, but it does not include cancelLoadInBackground(). It does have cancelLoad(), but cancelLoad() doesn't have exactly the same functionality.

Joe Malin
  • 8,621
  • 1
  • 23
  • 18