IntentService will be killed after I stop my application

后端 未结 5 1024
栀梦
栀梦 2021-02-05 11:50

I am referring to android design considerations: AsyncTask vs Service (IntentService?)

According to the discussion, AsyncTask does not suit, because it is ti

5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 12:35

    Actually there are different kinds of services you can implement. Use a Service instead of IntentService. There you need to look at START_STICKY , START_NOT_STICKY and START_REDELIVER_INTENT you can keep your service running in background even if your activity dies. Android services

提交回复
热议问题