以下代码适用于在SD设备上接收消息并在最终用户点击通知时执行事件。
&ApplicationIdCharacter = 'xxxxx-xxxx-xxx-xxxxxx'
&TheNotification.Text.DefaultText = "Notification Provider API"
&TheNotification.Actions.DefaultAction.Event.Name = "Insert_Msg"
&TheNotification.Appearance.Icon.Small = !"GX15IconKB"
&TheNotificationDelivery.Expiration = 3000
&TheNotificationDelivery.Priority = PushNotificationPriority.Normal
&TheNotificationConfiguration.ApplicationId = &ApplicationIdCharacter
&DeviceToken = 'xxxxxx-xxxxx-xxxx-xxxx-xxxxxxxx'
GeneXus.Common.Notifications.SendNotification(&TheNotificationConfiguration,&DeviceToken,&TheNotification,&TheNotificationDelivery,&OutMessages,&IsSuccessful)
但是如果没有用户干预,我无法找到任何这样做的例子。
在以前的版本中有一个参数
&GXPushNotification.Event.Execution = EventExecution.OnNotificationArrive
是否支持GX 15?
谢谢, Rogelio Arosemena
答案 0 :(得分:0)
罗赫,
如果您想在没有用户干预的情况下触发事件,请使用API:
GeneXus.Common.Notifications.SendEvent(..)
SendNotification用于发送需要用户干预以触发事件的文本消息(通过打开通知)
如果您需要文本和事件,请发送两者(SendEvent& SendNotification)