You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need some help on how to handle action buttons, they are already been sent from the server, i just need to lead the user to a screen in the app when the button is clicked.
If you're using the latest version of RN OneSignal, though, I'm pretty sure you can do the following:
OneSignal.Notifications.addEventListener('click', event => {
// check the actionId of the notification button that you set via: `event.result.actionId`
// Now you have access to the actionId and can redirect (navigate) accordingly
Thanks a lot for helping @VirtualDOMinic, i was able to get it to work by reading the docs of other SDK's and even older ones like the one you shared too.
Thanks man!
How can we help?
I need some help on how to handle action buttons, they are already been sent from the server, i just need to lead the user to a screen in the app when the button is clicked.
I can see a "How can I use the action button click event?" Section in the docs. But the only part of that section that seems useful to my use-case leads to "page not found".
https://documentation.onesignal.com/docs/web-push-sdk#addlistenerfornotificationopened
Code of Conduct
The text was updated successfully, but these errors were encountered: