How to simulate killing activity to conserve memory?

You can’t do it in an automated way b/c its completely non deterministic. See my answer here: https://stackoverflow.com/a/15048112/909956 for details. But good news is that all you need to do is just simulate calling onSaveInstanceState and you are indirectly testing this low memory situation. onSaveInstanceState can be triggered by: losing focus (by pressing home which … Read more