0

I read about IntentService and wonder about it´s lifestyle and effect on the Android Application. I know when the IntentService starts Android first starts the android.app.Application by running onCreate() . When the IntentService running queue is empty the IntentService can be killed. But what happens then to the started android.app.Application?

Community
  • 1
  • 1
Tord Larsen
  • 2,670
  • 8
  • 33
  • 76
  • You just ask out of curiousity, or you are dependent on that state? – azizbekian Apr 11 '17 at 09:43
  • I use the [onesignal](https://documentation.onesignal.com) that have the `IntentService` launching in Android on incoming push messages, Now I try to learn about what´s happening around my app. It´s a programming question I guess – Tord Larsen Apr 11 '17 at 09:58

1 Answers1

1

The Application class is a Singleton and will exist as long as your app's process still exits. The IntentService exits on its own once the are no more Intents for it to handle, but that does not mean the app process exits. Read about processes and threads here to get more information: https://developer.android.com/guide/components/processes-and-threads.html

Larry Schiefer
  • 15,687
  • 2
  • 27
  • 33