因为没有请求而导致IntentService被杀死后,应用程序会发生什么

时间:2017-04-11 09:36:18

标签: android android-lifecycle android-intentservice

我阅读了IntentService,并想知道它的生活方式和对Android应用程序的影响。我知道IntentService启动Android时首先通过运行android.app.Application启动onCreate()。当IntentService运行队列为空时,IntentService可以被杀死。 但是对于开始android.app.Application会发生什么?

1 个答案:

答案 0 :(得分:1)

Application类是一个Singleton,只要您的应用进程仍然存在,它就会存在。 IntentService一旦不再Intent处理就会自行退出,但这并不意味着应用程序进程退出。请阅读此处的流程和主题以获取更多信息:https://developer.android.com/guide/components/processes-and-threads.html