title: How to return to the latest launched activity when re-launching application after pressing HOME?
body: <p>Familiar scenario: I have a <em>Main</em> activity that launches a <em>Game</em> activity when a button is pressed. If the user presses HOME, and then launches my application again, it should be presented with the <em>Game</em> activity, which is what he was doing last when using the application.</p>
  
  <p>However, what happens instead is he gets the <em>Main</em> activity again. I have the feeling that Android is creating <em>another</em> instance of MainActivity and adding it to the stack for that application, instead of just picking whatever was on the top, because if I press BACK after relaunching the app, I get to the Game activity! And the Main.onCreate method is called every time, instead of calling GameActivity.onResume.</p>
  
  <p>My <code>AndroidManifest.xml</code> is pretty much 'bare bones':</p>
  
  <pre><code>&lt;activity android:name="MainActivity" android:label="@string/app_name"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.MAIN" /&gt;
          &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  
  &lt;activity android:name="GameActivity" android:label="@string/app_name"&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>As you can see, nothing too fancy.</p>
  
  <p>And this is how the new activity is launched, very simple too:</p>
  
  <pre><code>Intent intent = new Intent(this, GameActivity.class);
  startActivity(intent);
  </code></pre>
  
  <p>In theory this should work in Android just "out of the box", as the answer to a very similar question says: <a href="https://stackoverflow.com/questions/5086985/maintaining-application-state-in-android">Maintaining standard application Activity back stack state in Android (using singleTask launch mode)</a>, but it isn't.</p>
  
  <p>I've been reading and re-reading the documentation on Activity and Task and Stacks and browsing all related answers in SO but I can't understand why such a simple setup is not quite working as expected.</p>