Running a Service forever in background - Android

后端 未结 4 498
青春惊慌失措
青春惊慌失措 2021-01-15 11:50

I have created a Service in my android application which starts automatically on BOOT_COMPLETE through BroadcastReceiver. And That is

4条回答
  •  天命终不由人
    2021-01-15 12:05

    According to Service documentation

    The service will at this point continue running until Context.stopService() or stopSelf() is called.

    So your service will run forever until system will not decide to kill it because of lack of resources.

提交回复
热议问题