title: Prevent background Activity from being killed?
body: <p>I have an app that has a list of menu items. When you click a menu item it opens a corresponding activity. Now in that new activity when you click the back button and return to the main list, that activity gets killed and it does not return to its past state when you start it again.</p>
  
  <p>My question is, is it possible to not kill the activity when you leave it?</p>
  
  <p>I tried saving values like so:</p>
  
  <pre><code> protected void onSaveInstanceState(Bundle outState) {
          super.onSaveInstanceState(outState); 
          outState.putString("TO_REMEMBER", "Remember this");
      }
  </code></pre>
  
  <p>However once the activity gets killed and than re-started, the oncreate method is not reading any data:</p>
  
  <pre><code>    protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          if (savedInstanceState != null) {
  //This is not getting fired                 
  Toast.makeText(this, savedInstanceState.getString("TO_REMEMBER"), Toast.LENGTH_LONG).show();
                  }
          }
  </code></pre>
  
  <p>Any help on this is appreciated.</p>