David David - 3 months ago 16
Android Question

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?

Answer

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