title: Open app when push is received
body: <p>I am writing an Android+iOS app using Cordova/PhoneGap+Ionic2 and I would like to open the app when a push notification is received.</p>
  
  <p>If the app is is the background how can I open it upon receipt of the push? I would like this to happen without the user pressing a button - much like Skype does when you receive an incoming call.</p>
  
  <p>Here is my current handler for the push notifications:</p>
  
  <pre><code>// Handle received Push
  this.push.rx.notification().subscribe((msg) =&gt; {
      alert(msg.title + ': ' + msg.text);
  });
  </code></pre>
  
  <p>This works, but the alert action not take occur until AFTER the user clicks the received notification. I would like to bring the user in to the app automatically, and then present them with my own interface to the received notification.</p>
  
  <p>I looked at <a href="https://stackoverflow.com/questions/40233799/how-to-bring-a-cordova-android-application-to-foreground-or-start-and-bring-to-f">How to bring a Cordova Android application to foreground or start and bring to foreground once connected (and turn screen on) programmatically on GCM</a> and <a href="https://github.com/MobileChromeApps/cordova-plugin-background-app" rel="nofollow noreferrer">https://github.com/MobileChromeApps/cordova-plugin-background-app</a> - but I still do not have any event that occurs BEFORE the user clicks on the notification in which to call this plugin and therefore cannot use this.</p>