Android detect if an activity is on the top of the history stack
<p>From a parent class of an activity is there anyway to figure out if the child is on the top of the history stack. I need to perform an action on all of my activities in onPause, but only if the activity is running onPause and it is the top activity. This might happen if the user clicks the home button but not when an activity launches a new activity and thus calls its own onPause. Any ideas would be great.</p>

<p>Thanks</p>
