[OneSignal Plugin] Notification opened flow

Forge Component
(13)
Published on 2019-10-18 by OutSystems R&D
13 votes
Published on 2019-10-18 by OutSystems R&D

The Blocks:

  1. PushNotificationHandler
    1. This block will check for any notification received or opened and will navigate to the url present in the notification payload, in this case I want to navigate to Notification Detail
  2. LayoutBlank
    1. This contains the handler
  3. Misc/ApplicationLoadEvents
    1. When "OnLoadComplete" is Fired it will navigate to the landing page.


The Screens: 

  1. SplashScreen
    1. Contains block the LayoutBlank and applicationLoadEvents Blocks
  2. LandingPage
  3. NotificationDetail


What's happening: 

  1. Notification is sent to the device.
  2. User taps on notification
  3. Application opens in SplashScreen
  4. OnLoadCompleteEvent fires and user is navigated to the landing page
  5. Meanwhile PushnotificationHandler Completes and user is navigated to NotificationDetail


The Problem:

  1. On Step 4 I want that the user is navigated automatically to the notification Detail, instead of having this two navigations as I described.


Is there any way of accomplishing this ?

Hi,

if I understood your problem you've problems with deep link, right? Did you check this Demo: https://www.outsystems.com/forge/component-overview/8124/onesignal-demo 


If it's don't helps you, let me know.

Cheers

Miguel Verdasca wrote:

Hi,

if I understood your problem you've problems with deep link, right? Did you check this Demo: https://www.outsystems.com/forge/component-overview/8124/onesignal-demo 


If it's don't helps you, let me know.

Cheers

 

 Thank you for the reply, however the problem is not with the deeplink, as I am able to redirect the user correctly to the page.

The problem is the flow as it is not direct, it will first open the application in whatever is defined in the module in following order: SplashScreen -> DefaultScreen -> Deeplink.

I have made it work by delaying the splash screen a few seconds. That way if the user is coming from a push notification it will trigger before the "onLoadScreen" Event finishes and it will navigate the user directly to the deeplink, but I think there may be better solutions.