title: Android Studio - Activity Life Cycles, On Resume
body: <p>How can I know whether an activity has entered onResume due to a button being pressed and hence intent started, or if the user selected to navigate back? </p>
  
  <p>EDIT:</p>
  
  <ul>
  <li><p>Basically, Activity A is playing a song</p></li>
  <li><p>You can choose a new song to be played in Activity B, which sends an intent back to activity A to start a new song</p></li>
  <li><p>But at the moment if "back" is pressed from Activity B, I need the song to continue playing, rather than what it does at the moment which is restart as it runs the intent from previuosly in onResume();</p></li>
  </ul>