title: android - launchMode=singleTask and Notifications?
body: <p>I know there's been a few posts for what I'm about to ask but I can't find any with the right answer.</p>
  
  <p>From my understanding, if your main activity's (let's call it A) launchMode is set to singleTask, and A has initiated activity B then a click to the home button will destroy the history stack and re-launching the application will take you back to A and not B.</p>
  
  <p>I have launchMode set to singleTask because I have a persistent notification and I don't want to have multiple instances of the main activity to appear whenever the user clicks on the notification. </p>
  
  <p>Is there something I'm missing that would allow me to cater for both?</p>
  
  <p>So I'm asking if there's a way I can ensure that whenever the user wishes to launch the app, from the notification or not, to take him back to the last (current) activity.</p>
  
  <p>If I change launchMode to singleTop it works but I get multiple instances of the main activity whenever I launch it.</p>
  
  <p>Thanks</p>
  
  <p>Andreas</p>