In my application there’s an AsyncTask which runs in the background for much time. The problem is that in low memory situations it’s killed by the VM, is there a way to make the application’s priority higher, so that it would be harder to kill? Should I use a service instead? My only target is to make it difficult to kill, any advice or guidance would be greatly appreciated, thank you.
In my application there’s an AsyncTask which runs in the background for much time.
Share
I would advice you to make it a service and use
startForeground()which will make it a little more resistant. But even then it might get stopped on low memory.