I have an AsyncTaskLoader
that loads and processes a large amount of information. When I turn off the application, I need to stop it (... until he ate all my traffic). When the process is murdered, it does not stop (although what I was hoping for :)). In onDestroy
I tried to write this:
Loader loader = getSupportLoaderManager().getLoader(LOADER_ID); if (loader != null) { ((AsyncTaskLoader) loader).cancelLoadInBackground(); getSupportLoaderManager().destroyLoader(LOADER_ID); }
But he continued loading in the background. How to stop it?
super.onDestroy()
? .. Well, in the docks something else aboutonLoaderReset(Loader)
is written - they say it will be called if the loader has already given something to of destruction ... - YuriySPb ♦onLoaderReset
method, I have not used it. But he is not beaten - logs go and go ... - user189127Process.killProcess(Process.myPid());
? .. - YuriySPb ♦onClick
. - user189127