Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android任务列表中滑动删除应用后都发生了什么? #49

Open
vvLavida opened this issue Aug 18, 2016 · 0 comments
Open

Android任务列表中滑动删除应用后都发生了什么? #49

vvLavida opened this issue Aug 18, 2016 · 0 comments

Comments

@vvLavida
Copy link
Owner

简单来说,这和多次按返回键退出应用一样,系统会杀掉后台进程,但优势也不是这样。
从最近任务中移除一个条目会移除这个app存在的后台进程。但是它并不会直接结束service,当他们在任务列表中被清除的时候,其实他们自己有相应的api(onTaskRemoved被调用)处理service是否应当被结束。也就是说,你使用的e-mail接收的app即使你在任务列表中把它清除了,它的service也会接收e-mail信息。
当然如果你想要完全停止一个app,你可以通过设置->应用管理 ->进入应用信息页面,点击强制退出。强制退出会让该app的所有进程被杀掉,所有的service停止,所有的通知被移除,所有的提醒被关闭等。该app除了被再次调用的情况下,不会再被启动。
也就是说,是由app来决定在任务列表清楚的时候,后台进程是否被杀掉。

what-actually-happens-when-you-swipe-an-app-out-of-the-recent-apps-list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant