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

David picture David · May 17, 2011 · Viewed 16.4k times · Source

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?

Answer

David picture David · Jul 26, 2011

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