Android Push Notification Message Action is shown in Splash Screen

Hello guys,

We are using Landing Page with Rich Page message action for our push notifications. Our app has two different kind of users: 'Waiting' ones and 'Approved' ones. In the splash screen we are getting the user status and send them to correct Activity(WaitingActivity for waiting users; HomeActivity for approved users). However; we couldn't find any way to show Landing Page on top of the correct activity. 

If we use the Splash Screen for that; our Landing Page is closing when Splash Screen redirects.

What we are trying to do is pausing the Message Action until user sees the correct activity; and then we wanna show the Landing Page popup. Is there any way to do this? If there is not; then is there any suggestion you can make us to show the landing page popup with the push notification?

Regards

Didn't find what you were looking for?

New post

Comments

3 comments

  • Mustafa,

    Just so I'm understanding the behavior correctly, essentially what you're seeing is that your app shows the Splash Screen activity as expected, and this generally shows when the app is launched, which can also include when a push is tapped on and tries to display the Landing Page.

    However, when the Splash Screen redirects the user to the appropriate activity (Either Waiting or Approved depending on your logic), the Landing Page is being dismissed.

    Is that correct?

    You want to be able to only show the Landing Page if and only if the user has already been redirected to either the Waiting or Approved activity, but never show on the Splash screen activity, right?

     

    0
  • Hi,

    Yes, that is exactly what we are trying to achieve.

    0
  • Mustafa,

    Awesome!

    So, there is not a super easy way to accomplish this, but it can be done!

    Essentially what you'd be doing is creating a predicate that would store the arguments included with the push notification, which would include the Landing Page action.

    Once you've stored said Landing Page, you'd then be able to display the Landing Page, using the URL page, essentially where you want it in the app.

    So, your code might look something like this:

    https://gist.github.com/linkmh/cd372b92bdbc04c7ac25a3d238d2da95

    1

Please sign in to leave a comment.