How to test code built to save/restore Lifecycle of an Activity?
android, android-activity, lifecycle
Solution
If you have enabled Developer Options on your device, there is an option Do not keep activities that will help test `onRestoreInstanceState()`.
Problem
How can I test all of the following methods code? I want to play scenarios when all of them are happening to see if my code works for save/restore process of an activity. So what should I do in the Emulator to get all methods tested? ``` public class Activity extends ApplicationContext { protected void onCreate(Bundle savedInstanceState); protected void onStart(); protected void onRestoreInstanceState(Bundle savedInstanceState); protected void onSaveInstanceState(Bundle savedInstanceState); protected void onRestart(); protected void onResume(); protected void onPause(); protected void onStop(); protected void onDestroy(); } ```