AsyncTaskLoader

public abstract class AsyncTaskLoader
extends Loader<D>

java.lang.Object
   ↳ androidx.loader.content.Loader<D>
     ↳ androidx.loader.content.AsyncTaskLoader<D>


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)

This method is deprecated. Consider using LoaderManager.enableDebugLogging(boolean) to understand the series of operations performed by LoaderManager.

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

Executor getExecutor()

Returns the Executor to use for this Loader's AsyncTasks.

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