Module: sender

Methods


send(message, options)

The send Method
Parameters:
Name Type Default Description
message Object {} the message to be passed
Properties
Name Type Argument Default Description
alert String <optional>
message that will be displayed on the alert UI element
priority String <optional>
sets a processing priority on a push message. values can be 'normal' or 'high'
sound String <optional>
The name of a sound file
badge String <optional>
The number to display as the badge of the app icon
userData Object <optional>
{} any extra user data to be passed
apns Object <optional>
{}
Properties
Name Type Argument Description
title String <optional>
A short string describing the purpose of the notification.
actionCategory String <optional>
the identifier of the action category for the interactive notification
contentAvailable Boolean <optional>
action String <optional>
The label of the action button
urlArgs Array <optional>
an array of values that are paired with the placeholders inside the urlFormatString value of your website.json file. Safari Only
titleLocKey String <optional>
The key to a title string in the Localizable.strings file for the current localization. iOS Only
titleLocArgs Array <optional>
Variable string values to appear in place of the format specifiers in title-loc-key. iOS Only
windows Object <optional>
{}
Properties
Name Type Argument Description
type String <optional>
The type of message to send toast, raw, badge or tile.
duration String <optional>
Duration a Toast message is displayed 'long' or 'short'
badge String <optional>
Badge notifications type for badges that are not numbers (none, activity, alert, available, away, busy, newMessage, paused, playing, unavailable, error or attention), for numbers use the value in the main part of the message.
tileType String <optional>
Different type of tile messages with different sizes see the tile template catalog e.g. 'TileSquareText02' or 'TileWideBlockAndText02'
images Array <optional>
Images either local or remote need match the nubmer of the tileType
textFields Array <optional>
Texts needs to be same as the number of the tileType
simplePush String <optional>
simplePush version number
options Object = {} - the options to be passed
Properties
Name Type Argument Default Description
config Object <optional>
{} the criteria to select
Properties
Name Type Argument Description
ttl Number <optional>
the time to live in seconds. This value is supported by APNs and GCM Only
criteria Object <optional>
{} the criteria to select
Properties
Name Type Argument Description
alias Array <optional>
a list of email or name strings
deviceType Array <optional>
a list of device types as strings
categories Array <optional>
a list of categories as strings
variants Array <optional>
a list of variantID's as strings