react-native-batch-push icon indicating copy to clipboard operation
react-native-batch-push copied to clipboard

Getting received notification payload

Open talal-tilted opened this issue 5 years ago • 3 comments

Hello, just wanted to know how can we catch payload/deeplink attached to received notification ? Seems like there is no way to do that :/

talal-tilted avatar Dec 23 '20 18:12 talal-tilted

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.

Minishlink avatar Apr 21 '21 05:04 Minishlink

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.

Minishlink avatar May 14 '21 10:05 Minishlink

v6.1.0-rc.0 landed with support for the Batch events, including notification events with deeplink/payload :)

Minishlink avatar Nov 24 '21 11:11 Minishlink