title: Android: access the Activity stack programmatically
body: <p>is it possibile to get the current Activity stack from code?</p>
  
  <p>Here is my use case:</p>
  
  <ul>
  <li>the user navigates from Activity to Activity</li>
  </ul>
  
  <p>A -> B -> c -> D -> ...</p>
  
  <ul>
  <li><p>some of the Activity will finish after sending the user to the new screen, some others won't</p></li>
  <li><p>I need to check if pressing the BACK button will bring the user to the Activity A or any other because in the currently shown Activity I have a button that finishes the Activity and the icon of the button is different weather you'll be taken to tha Activity A or another Activity.</p></li>
  </ul>
  
  <p>Thanks in advance,</p>
  
  <p>Bye,
  Maurizio</p>