Code example for AsyncTaskLoader

Methods: deliverResult

0
		else forceLoad(); // start AsyncTask
	} 
	@Override 
	public void deliverResult(ArrayList<String> data) {
		mData = data;		// cache that stuff
		if(isStarted()) super.deliverResult(mData);	// deliver if loader wasn't stopped or canceled
	} 
	@Override 
	public void onReset() { 
		cancelLoad();	// cancel old task
		mData = null;
	} 
	@Override 
	public void onCanceled(ArrayList<String> data) {
		cancelLoad();	// cancel old task
		mData = null;
	} 
	@Override 
	public ArrayList<String> loadInBackground() {	// called from AsyncTask
		ArrayList<String> data = new ArrayList<String>();