how to know if I my app was resumed from a notification ( phonegap + pushwoosh + ios)

Comments

1 comment

  • Avatar
    Sergey Polshcha

    Yes, pushwoosh plugin supports this. Push dictionary in notification handler contains key "onStart" if this is happening on app start. So you can handle this like that:

    //set push notification callback before we initialize the plugin
    document.addEventListener('push-notification', function(event) {
                              //get the notification payload
                              var notification = event.notification;
    
                              //display alert to the user for example
                              alert(notification.aps.alert);
    
                              if (notification.onStart) {
                                  //push notification is displaying on application start, do here something what you need
                              }
                              });
    

Please sign in to leave a comment.