title: Controlling the Activity Stack from an already started activity?
body: <p>I have a  productlist activity, which is called from a category list <em>as well</em> as from search.</p>
  
  <p>When the user searches multiple times, then hits the back button, he has to step back all searches (=normal Android behaviour).</p>
  
  <p>What I try to achieve is that searches are not put on the Acticity Stack, so hitting back will always bring him to the last activity before his 1-n searches.</p>
  
  <p>Example activity flow:</p>
  
  <ol>
  <li>dashboard</li>
  <li>categories</li>
  <li>productlist (from categories)</li>
  <li>(search)</li>
  <li>productlist (from search)</li>
  <li>(maybe more searches)</li>
  <li>productlist (from search)
  ...</li>
  </ol>
  
  <p>I tried android:launchMode="singleTop" as described here:
  <a href="http://developer.android.com/guide/topics/search/search-dialog.html#LifeCycle" rel="nofollow">http://developer.android.com/guide/topics/search/search-dialog.html#LifeCycle</a></p>
  
  <p>Works, but since I re-use the same productlist activity for category navigation and search, this happens:</p>
  
  <ul>
  <li><p>Without 'singleTop', the user has to step back all 'productlist (from search)' activities</p></li>
  <li><p>With 'singleTop' the user ends (of course) on activity 'categories', but should on 'productlist (from categories)'</p></li>
  <li><p>Since the SearchManager fires the intent, I cannot use intent flags.</p></li>
  </ul>
  
  <p>Any chance to tell the already started activity (in case it is called by a search) to remove itself from the activity stack?</p>
  
  <p>Thanks!</p>