[OneSignal Plugin] OneSignalOnNotificationOpened is not triggered

[OneSignal Plugin] OneSignalOnNotificationOpened is not triggered

  
Forge Component
(5)
Published on 6 Oct (2 weeks ago) by OutSystems R&D
5 votes
Published on 6 Oct (2 weeks ago) by OutSystems R&D

Hi,

I've set an action to run on OnNotificationOpened but it never is executed. 

In our mobile app we need to redirect user to specific screen using the data like userid that is sent with notification. But on iOS notification just launches (brings foreground) the app but not executing OnNotificationOpened action associated on OneSignalPlugin\OneSignal.

Is there a bug or I'm missing something on the setup?


Thank you.

We have a similar problem. We send push messages from a web application with different message content (Content.Value) to our mobile app. The messages are received on the mobile device and opening the message brings the app to the front (if it isn't already). However, neither OneSignalOnNotificationReceived nor OneSignalOnNotifcationOpened seem to be triggered, because the app is not directed to the proper screen (only the home screen comes to the front). A simple Info Message at the beginning of these two client actions is not even displayed. The OneSignalPlugin block is part of the Layout block that is used on every screen and the events are coupled to the actions named above. We had a similar construction with Pushwoosh working, but due to other issues with Pushwoosh we decided to try OneSignal.

What are we doing wrong?

Created a support case for this issue

Hey, guys,

I have been tackling this case with Matthias and have a suggestion that might make sense for people who are also having trouble getting the 'Received' and 'Opened' events to trigger: try placing the block on the 'Layout' inside a container, instead of a placeholder, like the example below:

Don't forget to use the 'Register' action to enable your device to actually receive the notifications. I recommend calling it on the 'Ready' event handler of the Layout block, so it's initialized on every screen.

Would you guys please let me know if this solved it for you, as well?

Best regards,

Carlos Simões

Tried the solution from Carlos Simões and Cipriano Teibão (other thread); both ways work:

  • App opened, logged in, and at Homepage - triggered both events
  • App opened, logged in and at another page - didn't trigger events
  • App in background, logged, triggered the OneSignalOnNotifcationOpened event

Prefered the solution of Cipriano Teibão cause this only adds the EventListeners; but it still working only at Homepage, although all pages use the same Layout.


Hi Everyone,

Outsystems provided us with what they call a 'temporary workaround' that works for us. You can read about it in this thread https://www.outsystems.com/forums/discussion/26472/deeplink-to-specific-screen-with-parameter/#Post97197