Stop All Started Services on App Close / Exit
Posted
by Rad The Mad
on Stack Overflow
See other posts from Stack Overflow
or by Rad The Mad
Published on 2010-04-18T00:27:32Z
Indexed on
2010/04/18
0:33 UTC
Read the original article
Hit count: 454
android
|android-sdk
Is it possible to stop all started services when the user hits the Home Button?
I use:
startService(new Intent(ClassName.this, ClassName2.class));
stopService(new Intent(ClassName.this, ClassName2.class));
This means I will have to somehow add the 'stopService()' for 7+ of my app classes I've researched this topic and I think there's 'onTerminate' but still not sure how this should be implemented.
Any help or hints would be appreciated! Thanks!
© Stack Overflow or respective owner