title: How to get an activity from background avoiding to open a new instance of it
body: <p>My app has three <strong>fundamental</strong> activity. Like on Instagram, I have a bottom menu where I can choose one of this activity.</p>
  
  <p>When the app starts the first activity that appears is the <strong>HomeActivity</strong>. So the scheme is like this: </p>
  
  <blockquote>
    <p>Home --> Activity 2 --> Activity 3.</p>
  </blockquote>
  
  <p>After <strong>Activity3</strong> I can choose to go to the <strong>Activity2</strong> or to the Home. 
  However, it's important to say that when I start a new activity, the previous one stays in background.
  For Example:  when I start the <strong>Activity3</strong>, the <strong>Activity2</strong> is kept in background.</p>
  
  <p>The problem is that, when I go from <strong>Activity3</strong> to <strong>Activity2</strong> 
  <code>like that : Home &gt; Activity 2 &gt; Activity 3 &gt; Activity 2</code> there will be two different instances of the <strong>Activity2</strong>, one in background and the other running. So the question is:</p>
  
  <p>How can I change my code to make possible that:</p>
  
  <p>If there is no <strong>Activity2</strong> in background, the <strong>Activity3</strong> starts a new <strong>Actvity2</strong> (like It normally does)</p>
  
  <p>If there is an <strong>Activity2</strong> in background, the <strong>Activity3</strong> takes the <strong>Activity2</strong> from background and makes it running (avoiding to open a second instance of the same <strong>Activity2</strong>)</p>
  
  <p>It's hard but I hope I've explained it myself! Thanks for the answers!</p>