Methods
|
Fully qualified name
|
Description
|
GetNotifications
|
public JsonObject GetNotifications(input poFilter as JsonObject) method public JsonObject GetNotifications()
|
Returns all notifications for the master key relevant to the provided filter. The data is returned as a JsonObject containing the notifications details, including an Id property. The filter argument is in JSON form.
Note: For more details about how to construct the filter, see the Telerik documentation (http://docs.telerik.com).
|
UpdateNotification
|
public void UpdateNotification(input pcNotificationId as character, input poUpdateValue as JsonObject).
|
Modifies the payload of a single notification. This method uses a notification Id (typically obtained from a GetNotifications call) and a JSON object containing the values to update in the notification.
This JSON should be structured according to the format as specified in
|
DeleteNotification
|
public void DeleteNotification(input pcNotificationId as character)
|
Deletes a notification from the server. The method uses a notification Id (typically obtained from a GetNotifications call).
|
GetDevices
|
public JsonObject GetDevices(input poFilter as JsonObject) method public JsonObject GetDevices()
|
Returns information about all devices for the master key relevant to the provided filter. The filter argument is in JSON form.
Note: For more details about how to construct the filter, see the Telerik documentation (http://docs.telerik.com).
|
GetDeviceCount
|
public integer GetDeviceCount()
|
Returns the count of all the devices that are currently registered for push notifications with Telerik Backend Services.
|
BLOCK-LEVEL ON ERROR UNDO, THROW.
USING OpenEdge.Mobile.TelerikPushNotificationAdmin FROM PROPATH. USING Progress.Json.ObjectModel.JsonObject FROM PROPATH. DEFINE VARIABLE oAdminSvc AS TelerikPushNotificationAdmin NO-UNDO. DEFINE VARIABLE oResult AS JsonObject NO-UNDO. DEFINE VARIABLE iLoop AS INTEGER NO-UNDO. oAdminSvc = NEW TelerikPushNotificationAdmin( '<api key>', /* api */ '<master key>' /* master */ ). oAdminSvc:Initialize(). oResult = oAdminSvc:GetNotifications(NEW JsonObject()). oResult:writefile('notifications.json', TRUE). iLoop = oAdminSvc:GetDeviceCount(). MESSAGE "Number of registered devices: " iLoop VIEW-AS ALERT-BOX. |