What is a Loader?
The following pseudocode implementation of onStartLoading of a custom Loader implementation is taken from this blog post.
You can see that according to this method, when a loader enters a started state, i.e. when onStartLoading is called, we check if the mData is not-null, and if it is not-null, we deliver any previously loaded data immediately. The question is that what is a use-case in which there is loaded data already which is not yet delivered?
Initially I thought, a case might be when the loader enters the started state from the stopped state, and the observer detected a change in the data content and loaded the data while the loader was in the stopped state. But that is not true, because you have mentioned, "Loaders in the stopped state should still monitor the data source for changes so that the loader will know to force a new load if it is ever started again.", which implies that loaders keep monitoring the data source for changes but do not load the data in the stopped state, and the new data (after a change is detected) is essentially loaded when the loader enters the started state.
So what would be the case in which when a loader enters the started state, there is loaded data, stored in mData, which is not yet delivered?
@Override protected void onStartLoading { if (mData != null) { // Deliver any previously loaded data immediately. deliverResult(mData); } // Begin monitoring the underlying data source. if (mObserver == null) { mObserver = new SampleObserver; // TODO: register the observer } if (takeContentChanged || mData == null) { // When the observer detects a change, it should call onContentChanged // on the Loader, which will cause the next call to takeContentChanged // to return true. If this is ever the case (or if the current data is // null), we force a new load. forceLoad; } }