Code example for AsyncTaskLoader

Methods: deliverResult

    public void deliverResult(RESTResponse data) {
        // Here we cache our response. 
        mRestResponse = data;
    protected void onStartLoading() { 
        if (mRestResponse != null) {
            // We have a cached result, so we can just 
            // return right away. 
        // If our response is null or we have hung onto it for a long time, 
        // then we perform a force load. 
        if (mRestResponse == null || System.currentTimeMillis() - mLastLoad >= STALE_DELTA) forceLoad();
        mLastLoad = System.currentTimeMillis();
Connect your IDE to all the code out there  Get Codota for Java