Skip to content Skip to sidebar Skip to footer

Start Intent Service And Close App

I'm implementing GCM in my app and I start the RegistrationIntentService in the main activity. What happens if I close the app before the intent finishes? The service takes a few s

Solution 1:

Unless the system suddenly kills the application process, the intent will finish, because as a user you don't have direct control over when the app is actually closed (meaning, the process finished). When you "close" the app, you just put the activity in the background and the system will probably shut the process down some time later (see this thread).

I have to do something more?

So no, you should be fine with the standard IntentService - in normal cases it will finish even if the user "closes" the app, and in the case of system deliberately killing your process, there is nothing you can do about it anyway.

Post a Comment for "Start Intent Service And Close App"