Acoustic MCE InApp Cordova Plugin
Methods
(static) addInAppMessage(InApp)
Adds an InAppMessage to the database, this is largely for testing purposes.
Parameters:
Name | Type | Description |
---|---|---|
InApp |
dictionary | Message Dictionary |
(static) deleteInAppMessage(inAppMessageId)
Allows Cordova InApp Plugin to delete an existing InAppMessage
Parameters:
Name | Type | Description |
---|---|---|
inAppMessageId |
integer | id of message to be deleted. |
(static) executeInAppAction(action)
Allows Cordova InApp Plugin to call out to action registry to handle rich message actions.
Parameters:
Name | Type | Description |
---|---|---|
action |
Object | is normally in the format { "type": <type>, "value": <value> } but can be whatever is sent in the "notification-action" or the "category-actions" section of the payload |
(static) executeInAppRule(rules)
Allows Cordova InApp Plugin to look for and possibly execute the next InApp message.
Parameters:
Name | Type | Description |
---|---|---|
rules |
Array.<string> | A list of rules to be matched against. |
(static) registerInAppTemplate(callback, templateName)
Allows Cordova InApp Plugin to register a template handler.
Parameters:
Name | Type | Description |
---|---|---|
callback |
InAppTemplateCallback | The callback that handles the response |
templateName |
string | A template name that this handler displays |
(static) syncInAppMessages()
Allows Cordova InApp Plugin to initiate a sync with the server.
Type Definitions
InAppMessage
inAppMessageId The unique identifier of the InAppMessage
maxViews {integer} The total allowed number of views of the message.
numViews {integer} The current count of views of the message.
template {string} The template name that handles the message.
content {object} Template defined details of message
triggerDate {integer} Date the message should first appear in seconds since epoch
expirationDate {integer} Date the message should last appear in seconds since epoch
rules {Array.} A list of rules to be matched against.
Type:
- integer
InAppTemplateCallback(inAppMessage)
Parameters:
Name | Type | Description |
---|---|---|
inAppMessage |
InAppMessage | An InApp message to be displayed. |