How to automatically restart a service even if user force close it?

后端 未结 10 834
感情败类
感情败类 2020-11-27 11:19

I want a service to run all the time in my application. So I want to restart it even if it is force closed by user. There is definitely a way to do it as apps like facebook

10条回答
  •  感动是毒
    2020-11-27 11:46

    If I understand correctly, then actually this is not possible, Android feature to force close application was designed to allow user to get rid of unwanted applications, so it disallows any activities from it until user again starts any of its Activity.

    Restart the service even if app is force-stopped and Keep running service in background even after closing the app How?

提交回复
热议问题