Running a Service forever in background - Android

后端 未结 4 469
青春惊慌失措
青春惊慌失措 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:12

    Write your handler code in onStartCommand. But remember, your service will be paused when device goes in "sleep mode".

提交回复
热议问题