title: Android application changing from background to foreground
body: <p>I'm having an app A with Settings and Authentication activities. The Authentication activity is launched whenever some other app(say App B) is launched, so if the authentication is successful then app B's launcher Activity is shown(a kind of app lock protection). I have two behaviors to explain here,</p>
  
  <ol>
  <li><p>When I'm having my App A minimized, I will launch App B. This will trigger the Authentication activity of App A. If the authentication is successful then immediately I'm killing the Authentication Activity using finish(). But this will finish the Authentication activity and it will bring the activity of App A that was minimized previously to front(I don't want this to happen) instead of taking it to new app.</p></li>
  <li><p>If the App A is not running at all(not even minimized) than the Authentication activity is launched and on successful authentication the App B's activity is shown.</p></li>
  </ol>
  
  <p>Can someone explain me why these 2 different behaviors are being shown. Also in case 1 also I want to show the Activity of app 2 after successful Authentication.</p>