title: Is it possible for a BackgroundTask to know if an app is currently in the foreground? If so, how?
body: <p>I have a background task that runs when a raw notification is received. </p>
  
  <p>If the app is not in the foreground I want to display a toast notification, but if it <em>is</em> in the foreground, I don't want to display a notification. </p>
  
  <p>Is it possible to test if the app is in the foreground from a <code>BackgroundTask</code>? If so, how?</p>