Putting a Loader
in a static data member is bad, for any Loader
, let alone SQLiteCursorLoader
, as you will leak your Activity
.
I have also now officially discontinued SQLiteCursorLoader
.
Either:
Switch to using a
ContentProvider
and a regularCursorLoader
, orUse an event bus (
LocalBroadcastManager
, Square's Otto, greenrobot's EventBus, etc.) to have your service notify your UI layer to refresh itself based upon your changes