title: Application context gets killed but activity not
body: <p>I'm working on an application which has a few Activities. One Activity starts the next one. To share some Values I'm using a custom implementation of Application (I'm talking about <em>android.app.Application</em>) called MyApplication.<br/>
  As we all know, the Android system kills an app, if it needs more space. But this leads to a problem:<br/></p>
  
  <ul>
  <li>I open my app and use it just like any other app</li>
  <li>I close it (Home Button) and use other apps</li>
  <li>The system will kill my application because it's wasting memory</li>
  <li>When I reopen my App, it wants to open the last activity I used and I get a force close, because the values in MyApplication are null</li>
  </ul>
  
  <p>The strange thing is, that the system destroys my Application, but it seems like it keeps the Activity. I don't really understand why this is so because the Application doesn't seem to have a life cycle.<br/>
  <br/>
  What I want to have:<br/>
  When MyApplication (whole Application, not only the activity) gets killed, I want the last activities to be killed too. So when I reopen the App, it starts the main acitvity provided by the manifest.xml.<br/>
  <strong>or</strong><br/>
  The values in MyApplication are persisted and don't get lost if the Application gets destroyed. (I'm talking about a few objects so i think the shared preferences won't work).<br/>
  I don't want to use a service to bind my activities to, but is there a similar way to tell the system that my last used activity depends on the application-context?<br/>
  <br/>
  I hope you understand what my problem is and someone can help me out with this.</p>