title: How to inform background task if the foreground app is terminated?
body: <p>Using Windows phone 8.1 silverlight 
  Background Task is a WinRT Task.</p>
  
  <p>The problem I'm facing is I'm running a background task and I want the background task to exit when the foreground App is closed or terminated.
  I know when closing the foreground App I can use the Application_closing method to write to isolated storage to communicate with the background task. 
  But the real question is how do I handle the event when the foreground App goes from suspension state to terminated state. Or even if is it possible for the background task to query the status of the foreground App to the OS.
  Thanks you.</p>