Prevent an Android application from getting closed/stopped

android, java, ondestroy

Solution

If your question is where you can prevent your application from being closed that is not possible. The system has the right to close when it runs on low resources or when the user wants to - through a task killer or the incorporated system in ICS.

OnDestroy just notifies you about that, you can't "revive" the application there.

Problem

Is there some way to prevent the application from closing? Can I do it in the `OnDestroy`?

Original source