Class: MCSNotificationsCordovaPlugin

Class: MCSNotificationsCordovaPlugin

MCSNotificationsCordovaPlugin

Class responsible for receiving Firebase cloud messaging notifications. Callers should use MCSNotificationsCordovaPlugin global object.

Methods

cancelAllNotifications(callback, errorCallbackopt)

Cancel all notifications in the tray
Parameters:
Name Type Attributes Description
callback
errorCallback MCSNotificationsCordovaPlugin~errorCallback <optional>
triggered on the error
Source:

onMessageReceived(callback, errorCallbackopt)

Subscribe to message received event
Parameters:
Name Type Attributes Description
callback MCSNotificationsCordovaPlugin~messageReceivedCallback
errorCallback MCSNotificationsCordovaPlugin~errorCallback <optional>
triggered on the error
Source:

onTokenRefresh(callback, errorCallbackopt)

Subscribe to token refresh event that called: - to retrieve device token - when the system determines that the device token need to be refreshed.
Parameters:
Name Type Attributes Description
callback MCSNotificationsCordovaPlugin~tokenRefreshCallback triggered on the new token received
errorCallback MCSNotificationsCordovaPlugin~errorCallback <optional>
triggered on the error
Source:

setLogLevel(level)

Set log level for plugin logger
Parameters:
Name Type Description
level number NONE: 0, ERROR: 1, WARN: 2, INFO: 3, DEBUG: 4
Source:

Type Definitions

errorCallback(error)

This callback called when error happen.
Parameters:
Name Type Description
error object error object
Source:

messageReceivedCallback(message)

This callback used to retrieve notification messages.
Parameters:
Name Type Description
message INotificationMessage notification message
Source:

tokenRefreshCallback(token)

This callback used to retrieve device token.
Parameters:
Name Type Description
token string
Source: