Code example for AsyncTaskLoader

Methods: deliverResult

0
            // An async query came in while the loader is stopped 
            return; 
 
        this.data = data;
 
        super.deliverResult(data);
    } 
 
    @Override 
    protected void onStartLoading() { 
        if (data != null)
            deliverResult(data);
 
        if (takeContentChanged() || data == null)
            forceLoad();
    } 
 
    @Override 
    protected void onStopLoading() { 
        // Attempt to cancel the current load task if possible. 
        cancelLoad();