Method to catch notification clicked event?
See original GitHub issueWhen APP run both in foreground and background,
I know notification is clicked in onNotification
.
When I kill APP first and click notification, APP start running but onNotification
is not triggered.
Is there method getting the notification clicked event?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:19
Top Results From Across the Web
Notification: click event - Web APIs - MDN Web Docs - Mozilla
The click event of the Notification interface fires when the user clicks on displayed Notification.
Read more >Get click event on Notification - android - Stack Overflow
I have a notification that opens a url. So far, so good. Now I need to do some things when the notification is...
Read more >SDK Notification Event Handlers - OneSignal Documentation
OneSignal SDK setNotificationOpenedHandler method runs upon opening the app after a notification is clicked. Background Notification Received Event, Native ...
Read more >Handling Notifications and Notification-Related Actions
Handle User-Selected Actions. Actionable notifications let the user respond to a notification directly from the notification interface.
Read more >Notification behavior - web.dev
As you can see in this example, the notification that was clicked can be accessed as event.notification . From this, you can access...
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
@shrutic @JonoH hello guys. You must manually invoke the
PushNotification.popInitialNotification(notification => YOU_HANDLER(notification))
each time when application started. For example in your root component incomponentDidMount
.In my case, I invoking popInitialNotification one time, when application state is changed to
active
and remove listener for this event.Example:
@valeryq that works!!! Thanks so much! I’m now receiving the notification in the onNotification handler once I click on the notification (regardless of app state). Lifesaver!!
This needs to make it into the documentation as many people seem to be struggling with this exact issue.