title: how to do more with ionic push (ionic.cloud/$ionicPush)
body: <p>I am building an ionic app using sublime because I find it to be more simpler than android studio.</p>
  
  <p>currently I am addion push notification using ionic.cloud with fcm to send push notifications</p>
  
  <p>I foolowed the instructions here: <a href="https://docs.ionic.io/services/push/" rel="nofollow noreferrer">https://docs.ionic.io/services/push/</a></p>
  
  <p>currently the notifications are working but I want to add more functionality namely</p>
  
  <ul>
  <li>do specific action when notification is received in background/foreground</li>
  <li>access payload</li>
  </ul>
  
  <p>the snippet below is shows some code from the link above. are there additional functions for the ionicPush object or is there another way to achieve the functionality stated above?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>ionicPush.register().then(function(t) {
    return $ionicPush.saveToken(t);
  }).then(function(t) {
    console.log('Token saved:', t.token);
  });</code></pre>
  </div>
  </div>
  </p>