As I just learned, Android reserves the right to kill a background application's process at any moment in order to recycle RAM. The application is still running and can be resumed nevertheless, but all of my static variables are gone (see this article).
I'd like to simulate my app's behavior in this scenario. What's the easiest way to do this? There certainly must be an easier and more predictable way than writing some additional apps that allocate lots of memory.
android.os.Process.killProcess(android.os.Process.myPid())
? – Haircut