added in version 22.1.0
belongs to Maven artifact com.android.support:loader:28.0.0-alpha1

AsyncTaskLoader

public abstract class AsyncTaskLoader
extends Loader<D>

java.lang.Object
   ↳ android.support.v4.content.Loader<D>
     ↳ android.support.v4.content.AsyncTaskLoader<D>
Known Direct Subclasses


Static library support version of the framework's AsyncTaskLoader. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview.

Summary

Public constructors

AsyncTaskLoader(Context context)

Public methods

void cancelLoadInBackground()

Called on the main thread to abort a load in progress.

void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args)

Print the Loader's state into the given stream.

boolean isLoadInBackgroundCanceled()

Returns true if the current invocation of loadInBackground() is being canceled.

abstract D loadInBackground()

Called on a worker thread to perform the actual load and to return the result of the load operation.

void onCanceled(D data)

Called if the task was canceled before it was completed.

void setUpdateThrottle(long delayMS)

Set amount to throttle updates by.

Protected methods

boolean onCancelLoad()

Subclasses must implement this to take care of requests to cancelLoad().

void onForceLoad()

Subclasses must implement this to take care of requests to forceLoad().

D onLoadInBackground()

Calls loadInBackground().

Inherited methods

From class android.support.v4.content.Loader