Killing android application from task manager kills services started by app

前端 未结 4 1103
遥遥无期
遥遥无期 2021-01-12 18:27

My application has one activity which starts two services but does not bind them. If I select return button to exit application (I cannot see it in task manager), both of th

4条回答
  •  南方客
    南方客 (楼主)
    2021-01-12 19:17

    This is the behaviour expected. Services do not run in their own process. When you application is killed, your entire process dies with it.

    In the documentation I attached, there is an orange block a page down (unfortunately, I don't think I can link to it :-( ) That will tell you pretty much what a service is in a nutshell.

提交回复
热议问题