SDK 40 not getting notification data if app launched by tapping notification

Please provide the following:

  1. SDK Version: 40
  2. Platforms(Android/iOS/web/all): iOS (Android untested)
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Hi all thanks for your attention. Here is my dilemma:

  1. My app is initially closed.
  2. User selects a notification.
  3. This opens my app.
  4. I use NotificationsEmitterModule.getLastNotificationResponseAsync() but it returns null.

How can I get the notification data that was responsible for opening my app?

Prior to SDK 40 I used to do Notifications.addListener(handler) and it would be triggered with the selected notification that launched it.

Can you share a reproducible demo? This used to be an issue and it has since been fixed

Unless you’re using expo-location, in which case we have a fix landed but it hasn’t been published for the managed workflow yet

Thanks for the fast reply! Oh yes I am using expo-location. I just use that to get current location in an unrelated area. I was curious, how is this bugging the the notification selection on launch?

See this PR for all the details- [expo-notifications] notify all listeners of pending notification responses by esamelson · Pull Request #11536 · expo/expo · GitHub

It should be fixed in SDK 41

1 Like

Is this Android only? Because I am having this same issue on iOS :frowning:

I will try to create a reproduction case thanks for your reply!