I noticed strange situation using Android Loaders and Fragments. When I invoke LoaderManager.initLoader() after orientation change onLoadFinished is not called (although doc
This problem manifested itself for me with a CursorLoader returning a Cursor that was already closed:
android.database.StaleDataException: Attempted to access a cursor after it has been closed.
I'd guess this is a bug or an oversight. While moving initLoader() into onResume may work, what I was able to do was remove the Loader when I'm done with it:
To start the loader (in my onCreate):
getLoaderManager().initLoader(MUSIC_LOADER_ID, null, this);
Then after I'm done with it (basically at the end of onLoadFinished)
getLoaderManager().destroyLoader(MUSIC_LOADER_ID);
This seems to behave as expected, no extra calls.