title: Android: prevent activity to be instantiated more than once
body: <p>I was going through Android <a href="http://developer.android.com/guide/components/tasks-and-back-stack.html" rel="nofollow">Task and Back Stack documentation</a> and at one point they mention this:</p>
  
  <blockquote>
    <p>if your application allows users to start a particular activity from more than one activity, a new instance of that activity is created and pushed onto the stack (rather than bringing any previous instance of the activity to the top). As such, one activity in your application might be instantiated multiple times (even from different tasks), as shown in figure 3. As such, if the user navigates backward using the Back button, each instance of the activity is revealed in the order they were opened (each with their own UI state)</p>
  </blockquote>
  
  <p>Let's take an example:</p>
  
  <p>I have Activity A Starting Activity B which Starts Activity C which starts D.</p>
  
  <p><strong>Stack is A->B->C->D</strong> now it is possible to Start C from D so when we start C from D stack will be</p>
  
  <p><strong>A->B->C->D->C</strong></p>
  
  <p>Now instead of this standard behavior I want Activity to have only 1 instance or only 1 entry in the Back Stack. "SingleTop" will not work since Activity C was not on top when we started it from D.</p>
  
  <p>I might be missing something but is there any way to achieve this making sure an activity has only 1 backstack entry?</p>
  
  <p>Thanks
  Pranay</p>