Getting received notification payload
Hello, just wanted to know how can we catch payload/deeplink attached to received notification ? Seems like there is no way to do that :/
Hello, you can get the app deeplink from the React Native Linking module. Note that you need to setup getInitialUrl and the event listener, as the URL can arrive later (even in the case where the push notification opens the app)
As for the notification payload, this module does not provide it yet though you may be able to get the payload from a third party module like react-native-push-notification or others.
Maybe this new feature landed in v6.0.0-rc.1 can help you : https://github.com/bamlab/react-native-batch-push#handling-push-notification-initial-deeplink It doesn't return the entire payload, but you'll be able to get the initial deeplink reliably.
v6.1.0-rc.0 landed with support for the Batch events, including notification events with deeplink/payload :)