title: Get the status of the current task
body: <p>When I mention task below, I am referring to a specific Android concept here:
  <a href="http://developer.android.com/guide/components/tasks-and-back-stack.html#TaskLaunchModes" rel="nofollow">http://developer.android.com/guide/components/tasks-and-back-stack.html#TaskLaunchModes</a></p>
  
  <p>Hi there,
  Let's say there is a button in a base activity. When this button is pressed, a third party file viewer activity is launched from base activity through intent, which displays a file to the user. We do not set any flag in this intent, so I assume the viewer activity is in the same task as the base activity.</p>
  
  <p>So when this viewer activity is in the foreground, is there anyway to detect Home button press, since this triggers the status of the current task to change (probably from having one activity in the foreground to having all of them in the background?)?</p>
  
  <p>Any thought/idea/comment is highly welcomed!</p>
  
  <p>Thanks!</p>