How to get PWA notification to response to being clicked

0
Hi, I have successfully got PWA notifications set up in the test environment. I can choose a registered device and send a notification. This works when the app is closed but clicking on the notification does nothing. How do I now get it to respond by opening the app? I have tried adding the push notifications widget to the master layout in the app and adding in an Action which responds by opening the homepage: I then send a message for this device from the push admin snippet with Action set as TestAction. But clicking the notification still does nothing. What am I missing?
asked
3 answers
0

Hi Wendy,

Please refer this article this is for native push notifications but logic is same for the PWA to perform actions on push notifications.

 

https://medium.com/@mohammad.saqib_1262/part-6-enhancing-user-engagement-implementing-dynamic-actions-with-native-push-notifications-in-dd20c7693023

answered
0

Hi Wendy,

1. Go to your IVK_SendMessagesToDevices microflow -> Double click on Send message Java Action & In the context object select $MessageData.

 

2. Use Push Notifications widget & set your action name & action(like call a page).

 

3. Run the application & when you are sending the notification from admin page see there will be one input box called action name pass same action name there.

 

 

answered
0

Thanks for your patience, Muhammed, I followed these instructions (which are the same as you described them in your article).  However, clicking on the notification still does nothing. Let me know if you can see if I'm missing anything.  TBH I don't know how this can be 'listening' if the app is closed. 

1. Go to your IVK_SendMessagesToDevices microflow -> Double click on Send message Java Action & In the context object select $MessageData.

set to messagedata.png

2. Use Push Notifications widget & set your action name & action(like call a page).

push set up.png

3. Run the application & when you are sending the notification from admin page see there will be one input box called action name pass same action name there.

msg details.png

And then the notification that is received:

4.png

answered