title: Determine if an app is running in the foreground when a notification is received on iOS
body: <p>I would like to find a way to see what app is running in foreground or if the home screen is displayed when a local notification from my app show up. For example i want to have different actions if there is in homescreen or in someone else app.
  I tried to use processed and pid but the pid is generated hen the app starts and not the last time the app is used.
  Any idea?
  thanks</p>