ionic2 Push notification sent & receive Receiving a push notification


To receive push notifications we are supposed to tell the plugin to listen to incoming push notifications. This step is done after initialization & registration

import { Push, NotificationEventResponse} from "ionic-native";
        //the push element is created in the initialization example      
        push.on("notification", (response: NotificationEventResponse) => {
            let chatMessage: ChatMessage = <ChatMessage>{
              title: response.title,
              message: response.message,
              receiver: response.additionalData.replyTo,
              image: response.image