Code example for AsyncTaskLoader

Methods: deliverResult

0
 
        @Override 
        public void deliverResult(D data) {
            if (!isReset()) {
                this.data = data;
                super.deliverResult(data);
            } else { 
                // An asynchronous query came in while the loader is stopped 
            } 
        } 
 
        @Override 
        protected void onStartLoading() { 
            if (data != null) {
                deliverResult(data);
            } else if (takeContentChanged() || data == null) {
                forceLoad();
            } 
        } 
 
        @Override