About local notification and deep link
See original GitHub issueQuestion
Hi, today we tried to show a local notification (PushNotification.localNotification
) with deep link attached, but we cannot find an option at https://github.com/zo0r/react-native-push-notification#local-notifications for that. Do we support attaching a link to the local notification? In our case, the notification should appear and open-deep-link-on-click in all cases of app foreground, background and killed. It would be great if somebody can help pointing a way to achieve that.
Thank you and best regards!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
How do I implement deep links in local notification
You can use DeepLinkKit for navigation to different screens. I'm using this library in my app, I have about 30-37 deeplinks for every...
Read more >URLs, Links and Deep Links - OneSignal Documentation
This guide explains how to open to a specific page of your app or website using push notifications. For options using Email or...
Read more >Organizing your app to handle deeplinks and push notifications
This article presents a way to organize in the same module the code for handling deeplinks and the code for handling push notifications....
Read more >Scheduling and Handling Local Notifications - Apple Developer
Local notifications give you a way to alert the user at times when your app might not be running. You schedule local notifications...
Read more >Deep Links in Push Notifications - Iterable Support Center
A deep link is a URI that links to a specific location within your mobile app. The following sections describe how to work...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @Niweera for very detailed and helpful answer! We managed to make it work, thanks to your guide. However - just sharing here because the problem was deeper than it looks - because in our code MainActivity is not the launch activity 😂
We didn’t understand why
onNotification
didn’t work. It turns out we have an activitySplashActivity
that lies before everything; after reviewing the code ofreact-native-push-notification
we saw this method:So clearly this implies that the launch activity is MainActivity. Then we’ve decided to temporary patch
react-native-push-notification
with the following:Then
onNotification
continues to work.Hi @thongncvn There is a way to avoid this change in the library. It’s documented in the readme and in issues.
https://github.com/zo0r/react-native-push-notification/issues/1976#issuecomment-835367990