In order to receive notifications, the devices must be registered before using the device registration structure mentioned in this article. The Push Notifications in Native Mobile Applications are sent using the External Objects for Native Mobile Applications called RemoteNotifications.
Gives the error code of the delivered notification. For instance:
- 200: Deliver success.
- 400: Deliver error on client-side.
- 500: Deliver error on server-side.
Gives an error description. It is empty when no error occurs.
Sends a notification. It has poor performance for batch sending, use Send method instead.
Return value |
None |
Parameters |
ApplicationId:Character(128), DeviceType:SmartDeviceType, DeviceToken:Character(255), AlertMessage:Character(128)
|
Set the badge number on the application icon in a target iOS device.
This action is done by indicating the application identifier, the device token (or device identifier), the badge number and optionally the path to a custom sound. It returns 0 if the operation has executed successfully.
Return value |
Numeric(5.0) |
Parameters |
ApplicationId:Character(128), DeviceToken:Character(255), BadgeNumber:Numeric(5.0), Sound:Character(128)
|
Reset the badge of the application icon in a target iOS device. It returns 0 if the operation has executed successfully.
Return value |
Numeric(5.0) |
Parameters |
ApplicationId:Character(128), DeviceToken:Character(255)
|
Sends a notification to a specific user-defined event (or action) with parameters already set. It has poor performance for batch sending, use Send method instead.
Return value |
None |
Parameters |
ApplicationId:Character(128), DeviceType:SmartDeviceType, DeviceToken:Character(255), AlertMessage:Character(128), ActionName:Character(128), Parameters:NotificationParameters
|
Indicates which will be the main object that receives the notification.
Return value |
None |
Parameters |
ApplicationId:Character(128)
|
Adds a new notification (based on RemoteNotification SDT).
Return value |
None |
Parameters |
RemoteNotification:RemoteNotification
|
Sends the notification to the target device (previously set).
SetConfiguration method
Allows you to set your notification preferences at runtime.
It does not have any.
Indicates Smart Devices platforms.
Android |
Android device |
Blackberry |
Blackberry device (not longer supported in GeneXus 15) |
iOS |
iOS device |
Windows |
Windows Phone device (not longer supported in GeneXus 15)
|
Indicates how the notification will be executed.
OnLaunchByUser |
The notification will be lanched by the user. |
OnNotificationArrive |
The notification will be launched when the notification arrives. |
PushNotificationPriority
The priority of the notification.
Normal |
Do not wake up the device if it is in doze mode. |
High |
Wake up the device if it is in doze mode.
|
Describes a target device with its settings.
- DeviceType: SmartDeviceType
For indicating the target device type.
- DeviceToken: Character(256)
For indicating the target device identifier (value when it is registered).
- Title:Character(127)
The notification title.
- Message:Character(127)
The notification message.
- Icon:Image
The notification icon.
- Sound:Character(20)
The audio filename (must be included manually to the Android/iOS project).
- Badge:Character(3)
For setting the application badge on iOS devices.
- Event
- Name:Character(100)
The event/action name on the client-side (Panel or WorkWith for Smart Devices event name)
- Execution:EventExecution
Indicates how the notification will be executed.
- Parameters: Collection
- Name:Character(100)
The parameter name. It must be the name of a variable on the client-side (Panel or WorkWith for Smart Devices).
- Value:Character(100)
The parameter value.
- Delivery
- Priority:PushNotificationPriority
For indicating the priority of the notification.
- The event defined in the main app with OnNotificationArrive mode cannot contain any command, function or control that includes UI (such as msg, confirm, etc). Remember that this kind of notifications can arrive with the device locked, with the app running on background, and even when the app not running. However, this can be done if the app is running on foreground (the developer must check it through Interop.ApplicationState property).
Platforms |
Smart Devices (iOS, Android) |
Add, Send and SetConfiguration methods are only available for .NET as of GeneXus X Evolution 3.