Search code examples
notificationsonesignalgenexusgenexus-sd

Can't execute an event from a Push Notification using One Signal


We have developed an SD app with GX15 U5 which sends and receive push notifications using One Signal API. This works fine.

But when I send a push notification from a Web Panel developed with GX Ev3 U11 to invoke an Event on main SD panel, this does not happens. The code used to send from web panel is the following:

&PushConfigProperties = OneSignalPushConfig()
&GXPushNotification.Alert= 'Mi Notificacion'
&GXPushNotification.Title='Title'
&GXPushNotification.Badge = '1'
&GXPushNotification.Event.Name='Acerca_De'
&GXPushNotification.Event.Execution = EventExecution.OnNotificationArrive
&ProviderDeviceId ='11f3cfc0-569d-4e30-a6dc-a60308489a31'
&GXPushOperationResult = PushSendMessageDevice(&PushConfigProperties, 
&GXPushNotification, &ProviderDeviceId, 2)

Event Acerca_De exist on main SD panel

What is causing to not execute this event?


Solution

  • Rogelio,

    As of GeneXus 15 upgrade 3 (or higher), GeneXus integrated a new native way of sending and receiving Push Notifications using OneSignal provider.

    We highly recommend to migrate to this new API, as the older one is deprecated and will not be updated with new features.

    You may need to rewrite some code, but will be more future proof. As this new implementation will support new providers and all the OSs new features.

    Regarding the last question.. Notifications should be sent from the KB that the App SD was built. If you want to send Notifications to the SD App, the best approach should be to create a REST Procedure Endpoint (served from Web App SD v15) and invoked from GX Evolution 3 app.