Notifications Listener

A listener to handle actions from the Notifications module.

Declared In

lib/main/modules/NotificationsModule.js


Setting up

Synerise.Notifications.setListener({
	onRegistrationToken: function(token) {
		//optional function
	},
	onNotification: function(payload) {
		//optional function
	},
	onRegistrationRequired: function() {
		//mandatory function
	}
});

Functions

The following method is called when Synerise receives a registration token from the native part of application.

onRegistrationToken: function(token) {
	//implementation
}

Parameter Type Description
token string Firebase Token

The following method is called when registration for Push Notifications is needed.

onRegistrationRequired: function() {
	//implementation
}

You need to invoke the Synerise.Notifications.registerForNotifications(registrationToken, mobileAgreement, onSuccess, onError) method again.


The following method is called when Synerise receives a notification's payload from the native part of application.

onNotification: function(payload) {
	//implementation
}

Parameter Type Description
payload string Notification's key-value data object
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.