title: How to clear stack back to root activity when user leaves application?
body: <p>I have an application with 2 activities, LogonAct and MainAct. LogonAct is a logon activity which I want to force the user to go through each time they return to the application. I've set <strong>android:clearTaskOnLaunch="true"</strong> on LogonAct.</p>
  
  <p>When I first start the app I go through this sequence of screens,</p>
  
  <p><code>Home -&gt; LogonAct -&gt; MainAct -&gt; Home</code></p>
  
  <p>I then follow this sequence,</p>
  
  <p><code>LogonAct -&gt; Back -&gt; MainAct</code></p>
  
  <p>Why is it bringing me back to MainAct? Shouldn't that activity haven been closed since LogonAct has <strong>android:clearTaskOnLaunch="true"</strong>. I expected to be brought back to Home when I hit the Back button from LogonAct.</p>
  
  <p>Relevant snippets from AndroidManifest.xml,</p>
  
  <blockquote>
  <pre><code>   &lt;activity android:name=".LogonAct"
               android:clearTaskOnLaunch="true"&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=".MainAct"&gt;
         &lt;meta-data android:name="android.app.default_searchable"
                    android:value=".SearchResults" /&gt;
     &lt;/activity&gt;
  </code></pre>
  </blockquote>
  
  <p>I'm using 1.5.</p>
  
  <p>Any help appreciated.</p>