Search code examples
androidexitondestroy

is there an Application::onDestroy() equivalent for Android?


Hi I am using the Application::onCreate to put my initialisation code of my app, but when waiting some time and starting other apps, I noticed the instance of the Application class gets created again...

How to detect globally when Android is shuttting down my Application instance?


Solution

  • I have been using the Service class and had no problem since. If someone has a better answer, let me know.