Reacting to the tap on a push notification, parameters not passing when I'm already on the screen I want to navigate to

Please provide the following:

  1. SDK Version: Unsure
  2. Platforms(Android/iOS/web/all): IOS/Android

I’m using addNotificationResponseReceivedListener in my app.js to cause the user to navigate to a specific screen within my app. I’m also sending parameters within the navigate as shown below so that when the user gets to the screen, the screen has the vars it needs to load the correct info. I’m sending those parameters as part of the push notification.

Here’s how I’m sending the user to the correct screen:

navigate('MsgDetail', {
        msgId: msgId,
        recShowCust: recShowCust,
        clientId: clientId

This works well for the most part except when the user is already on the MsgDetail screen when they tap the push notification. If they are on the screen viewing say message A then they tap on a push notification for message B, they screen doesn’t load message B it just stays on message A. So… I a little confused as to how I can get the message screen to load message B if they are already viewing message A when they tap the push notification.

Thanks and I apologize if my explanation is a bit confusing, happy to answer any questions about anything I left out. A bit of a newb in terms of React Native and Expo.

Thanks in advance for any assistance with this.

I realized just now that this is an issue on IOS only. On Android, if I am on the message screen viewing message A and I click a notification for Message B, the message screen correctly shows the details of Message B.

I take that back, it seemed to have worked once on Android but then I couldn’t get it to work correctly again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.