How to prevent an android activity to get killed

后端 未结 3 1193
闹比i
闹比i 2020-12-22 07:21

I have developed an application that does require to do constant network activity. This Activity does the network connections thru an AsyncTask, sometime this work being do

3条回答
  •  -上瘾入骨i
    2020-12-22 07:43

    If you use a Service and make sure it stays active (by first starting it and simply not stopping it) the application wont be killed (unless it's extremely low on memory of course).

提交回复
热议问题