Stop All Started Services on App Close / Exit
- by Rad The Mad
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!