Can an IntentService run indefinitely?

后端 未结 4 1211
小蘑菇
小蘑菇 2020-12-14 03:06

Based on my understanding, an IntentService will get stopped when its current request is done.

Consider the below scenario, i will be triggering a request to the Int

4条回答
  •  遥遥无期
    2020-12-14 03:47

    If you don't have much work to do in the service you could just extend a regular service. Return null in the onBind() and receive commands in onStartCommand() which returns START_STICKY.

提交回复
热议问题