Push Notifications Module - Receive a notification when the app is open

3
Hi everyone! I’m using the module to show notifications when some actions are done. However, to meet the requirements I need to show them when the user has the app open but currently the notifications are shown only when the user is not using the app. If someone knows how to achieve this I would really appreciate your help! Thanks in advance
asked
1 answers
0

Hello

 

In order to be able to receive push notifications when the app is on the foreground, it’s required to add a snippet in your Home_Native page that have an AppEvents Widget which, in turn, calls a nanoflow OnPageLoad_RegisterPushNotifications that register your device as able to receive and handle notifications.

 

 

Then, if you defined correctly the settings in the Configuration section of the PushNotifications.Administration page, you will see your device in the Registered Devices List.

Click on the Send Message menu item (...) and fill the message details as below:

 

 

The Title and the Body could be any text, but the ActionName, must be equal to the actionName (in this case Example) defined in the widget Notifications also included in the Snippet. This will call a nanoflow which, finally, handle the notification when the app is on foreground.

 

 

The result will be as in the image below:

 

 

That’s it. 

I hope it helps.

 

answered