[OneSignal Plugin] OneSignalOnNotificationOpened is not triggered

[OneSignal Plugin] OneSignalOnNotificationOpened is not triggered

  
Forge Component
(9)
Published on 19 Oct (4 weeks ago) by OutSystems R&D
9 votes
Published on 19 Oct (4 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


Hi all, 

Sorry for unburying this topic from the grave but I'm unable to make notification events work with deeplinks.

I've already tried all the solutions described in the topics on this subject but with no succcess.

I've created an Web App and a Mobile App to test push notifications. The Web App is able to send push notifications with deeplinks for a specific screen in the Mobile App.

The issue is having the Mobile App firing the OnNotificationOpened and the OnNotificationReceived events. They never seem to fire.

I've attached some screenshots of my configuration in the mobile app side.

Any help on this would be much appreciated!






Try adding an OnReady action to your Layout_Blank webblock. The OnReady action should have a local variable of type InFocusDisplayOption. Set it's Id value to Entities.InFocusDisplayOption.NONE. Then call Register with your OneSignal AppId and the InFocusDisplayOption. Your OnReady action should look something like this.

Did it for us.

Good luck!