Android Home button not resuming last Activity
<p>I am trying to solve an issue sort of similar to what was done here (<a href="http://stackoverflow.com/questions/3623704/how-to-control-activity-flow-back-button-versus-home-button">link text</a>)</p>

<p>Except in my case where Activity A, started Activity B, started Activity C, when the user resumes the app after pressing the home button - I want C, the last Activity, to be displayed.  Instead what is happening is I am back to A.  </p>

<p>Also on a side note I have discovered that even when I exit the application, if I hold down the Home button, my app is still listed as an active app even though in the LogCat I can see that it exited OK.</p>

<p>Also, in case it matters, I did recently add <code>android:launchMode ="singleTask"</code> in order to make some notification logic work correctly.  I was seeing the Home button behavior before that though.</p>

<p>I really appreciate any ideas you might have.  </p>

<p>[edit - adding some code snippets]</p>

<pre><code>        &lt;activity 
              android:name         =".connection.ActivityA"
              android:label        ="@string/app_name"
              android:configChanges="orientation|keyboardHidden"
              android:theme        ="@android:style/Theme.NoTitleBar"
              android:launchMode   ="singleTask"
              android:screenOrientation="portrait" &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         =".screens.AvtivityB"
              android:label        ="@string/app_name"
              android:configChanges="orientation|keyboardHidden"
              android:theme        ="@android:style/Theme.NoTitleBar"
              android:launchMode   ="singleTask"
              android:screenOrientation="portrait"  &gt;
    &lt;/activity&gt;

    &lt;activity android:name         =".screens.ActivityC"
              android:label        ="@string/app_name"
              android:configChanges="orientation|keyboardHidden"
              android:theme        ="@android:style/Theme.NoTitleBar"
              android:screenOrientation="portrait" &gt;
    &lt;/activity&gt;
</code></pre>

<p>Then here is how I kick off each Activity:
In Activity A:</p>

<p>private void startActivityB()
   {
      Intent activityBIntent = new Intent(this, ActivityB.class);
      this.startActivityForResult(activityBIntent , ACTIVITYB_TAG);
   }</p>

<p>Activity B actually has several Activities that it chooses from (it has a list of Intents) to display based on input it receives but launches them all the same way as Activty A launched B.  Once the first Activity is displayed the user swipe the screen to navigate to the left or right screen.  When the user swipes left or right, the current activity puts info in its return Intent that Activity B uses to display the next Activity.  Also since logic outside of the user's control could prompt a change in the screen displayed, each Activty calls finish on itself in onStop to avoid back-button issues.</p>
