How do I know if a user navigates away from my android app java?
<p>I have multiple activities in my android app. I would like to log it when a user navigates away from and back to my application. I cannot do this in onResume() and onPause() in the activities because I wouldn't know if my user is navigating away or simply launching another activity.</p>

<p>Is there a place at application level for me to know if a user navigates away from and back to my application? </p>