Register a Client for getting Push Notifications
Note: Catalyst Push Notifications feature is not available to Catalyst users accessing from the EU and IN data centers.
The enableNotification() method registers a client for receiving the notification from this application. The notification used in the code snippet below is the component instance .
The enableNotification() method returns a promise which is resolved to an object. After resolving the promise, the developer can handle the notification message using the message handler.
copy
//Register the client
var notification = catalyst.notification;
notification.enableNotification().then((response) => {
//Create a handler for the message when received
catalyst.notification.messageHandler = (msg) => {
//Action to be performed when message is generated.
}
});
Yes
No
Send your feedback to us
Skip
Submit