define variable oPayload as JsonObject no-undo.
/* Message builder equivalent of SendNotification() method */ assign oPayload = PushNotificationMessageBuilder :Send(cMessage, iBadgeCount) :Payload. /* Message builder equivalent of ScheduleNotification() method */ assign oPayload = PushNotificationMessageBuilder :Schedule(cMessage, iBadgeCount) :At(add-interval(now, 1, 'hour')) :Payload. /* Perform the send */ oPushService:SendNotification(oPayload). |
Filter
|
Description
|
Devices
|
Enables you to choose specific devices to which the notifications are sent using the OnDevice, NotOnDevice, IncludeDevice, and ExcludeDevice methods. These methods filter the devices by device ID (character).
|
Channels
|
Classifies devices by channel using the IncludeChannels, ExcludeChannels, and MatchChannels methods. These methods use a JsonArray argument.
Note: Channels is a predefined array column.
|
Platforms
|
Classifies devices based on platforms: Android and iOS. The OnPlatform, NotOnPlatform, IncludePlatform, and ExcludePlatform enable filtering the devices by platform. These methods use the OpenEdge.Mobile.ApplicationPlatformEnum parameter.
|
/* send to specific devices */
define variable cDeviceId as character extent 3 no-undo. assign cDeviceId[1] = '<first-device-id>' cDeviceId[2] = '<second-device-id>' cDeviceId[3] = '<third-device-id>'. assign oPayload = PushNotificationMessageBuilder :Send(cMessage, iBadgeCount) :IncludeDevice(cDeviceId[1]) :IncludeDevice(cDeviceId[2]) :IncludeDevice(cDeviceId[3]) :Payload. /* Perform the send */ oPushService:SendNotification(oPayload). |
Parameter
|
Description
|
Filter name
|
A character expression that matches the column name.
|
Filter value
|
A value based on which the devices are filtered.
Note: The type of data required depends on the filter type. For instance, an Array filter requires an instance of a JsonArray object; a String filter requires a character value.
|
Operand (such as Equals or Includes)
|
Operands represented by the OpenEdge.Mobile.PushNotificationFilterOperandEnum enumeration.
Note: Different data types support different operands. For instance, a Geo filter supports Near, NearSphere, and Within but not Equals or Includes.
|