Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Engaging the plugin

Call this method as soon as possible in your app initialization procces in order to register the device and recieve push.
Method is required to be called on every app launch.
Notification methods (pushMessageReceived, richMessageReceived) we only be available after calling this method.
@param {string} sdkID - The SDK ID for your account.
@param {string} appSecret - The App Secret for you account.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.

AppoxeePlugin.prototype.engage = function(sdkID, appSecret, successCallback, errorCallback) {}

...

Returns "true" if registration is completed, "false" if failed or not completed yet.
AppoxeePlugin.prototype.isReady = function (successCallback, errorCallback)

...

@param {string} alias - A String to be identified as as the device alias
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.setDeviceAlias = function(alias, successCallback, errorCallback) {}

...

@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.getAlias = function (successCallback, errorCallback) {}

...

Remove the alias associated with this device.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.removeDeviceAlias = function (successCallback, errorCallback) {}

...

Get information assoiciated with this device.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.deviceInformation = function (successCallback, errorCallback) {}

...

Get rich messages for this device.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.getRichMessages = function (successCallback, errorCallback) {}

...

Delete a Rich Message.
@param {string} msgID - A string representing the message ID.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.deleteRichMessage = function (msgID, successCallback, errorCallback) {}

...

Sync inbox messages with Appoxee Servers.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.refreshInbox = function (successCallback, errorCallback) {}

...

Disable / enable the inbox feature.
@param {string} disable - a string with a value of "true" or "false".
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.disableInbox = function (disable, successCallback, errorCallback) {}

...

Get if inbox feature is enabled.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.isInboxEnabled = function (successCallback, errorCallback) {}

...

Add and remove tags from device.
@param {Array} toAdd - An array of Strings ,that represent tags, to be added.
@param {Array} toRemove - An array of Strings, that represents tags, to be removed.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information. 
AppoxeePlugin.prototype.addTagsToDeviceAndRemove = function (toAdd, toRemove, successCallback, errorCallback) {}

...

Remove a tag from device.
@param {Array} toRemove - An array of Strings ,that represent tags, to be removed.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.removeTagsFromDevice = function (toRemove, successCallback, errorCallback) {}

...

Add a tag to device.
@param {Array} toAdd - An array of Strings ,that represent tags, to be added.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.addTagsToDevice = function (toAdd, successCallback, errorCallback) {}

...

Get tags which are 'ON' for this device.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.fetchDeviceTags = function (successCallback, errorCallback) {}

...


Get the application tags defined at Appoxee. Note that only 'application tags' can be added as 'device tags'.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.fetchApplicationTags = function (successCallback, errorCallback) {}

...

Get if the feature is enabled.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.isPushEnabled = function (successCallback, errorCallback) {}

...

Method will disable / enable the feature.
@param {string} disable - a string with a value of "true" or "false".
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.disablePushNotifications = function (disable, successCallback, errorCallback) {}

Code Block
languagejs
titleExample
 function disablePushNotifications() {
    
    AppoxeePlugin.disablePushNotifications("true",
                                           function (json) {
                                           alert(JSON.stringify(json));
                                           },
                                           function (json) {
                                           alert(JSON.stringify(json));
                                           });
}


Custom Fields API

Set Date Field

Set a date value for a key.
@param {string} key - A key to be paired with the value.
@param {string} value - A value which conforms 'yyyy-MM-dd hh:mm:ss'.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.setDateField = function (key, value, successCallback, errorCallback) {}

...

Set a number value for a key.
@param {string} key - A key to be paired with the value.
@param {string} value - A value which contains a number, i.e. "34", "34.54".
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.setNumericField = function (key, value, successCallback, errorCallback) {}

...

Set a string value for a key.
@param {string} key - A key to be paired with the value.
@param {string} value - A value which contains string.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.setStringField = function (key, value, successCallback, errorCallback) {}

...

Get a key-value pair for a givven key.
@param {string} key - A key paired with a value.
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.
AppoxeePlugin.prototype.fetchCustomFieldByKey = function (key, successCallback, errorCallback) {}

...

AppoxeePlugin.prototype.getLastPushPayload = function (successCallback, errorCallback) {}

...

AppoxeePlugin.prototype.setApplicationBadgeNumber = function (badgeNumber, successCallback, errorCallback){}

Code Block
titleSet badge
function setApplicationBadgeToZero() {

	    AppoxeePlugin.setApplicationBadgeNumber("0", // Pass the Badge number you want the application icon to present.
                                           function (json) {
                                           alert(JSON.stringify(json));
                                           },
                                           function (json) {
                                           alert(JSON.stringify(json));
                                           });
}

Show Notifications on Foreground (iOS10 Only)

Method will show / hide notification when app is in foreground. Available for ios10 and above.
@param {string} show - a string with a value of "true" or "false".
@callback {string} successCallback - A json string with a response for this operation with information.
@callback {string} errorCallback - A json string with a response for this operation with information.

AppoxeePlugin.prototype.showNotificationsOnForeground = function (show, successCallback, errorCallback){}

Code Block
languagejs
titleShow Notifications On Foreground iOS10
function showNotificationOnForeground() {
	
	    AppoxeePlugin.showNotificationsOnForeground("true", // Pass 'true' or 'false' to indicate if notifications should be displayed on foreground.
                                           function (json) {
                                           alert(JSON.stringify(json));
                                           },
                                           function (json) {
                                           alert(JSON.stringify(json));
                                           });
}

...

Method is called when a rich message is received.
@param {string} jsonArg - A json string with the rich message payload.
AppoxeePlugin.prototype.richMessageReceived = function richMessageReceived(jsonArg) {}

...