Push notification Android app running in foreground

0
I have followed the instructions as described in the Push Notifications Module. I have a deployed an app on my Android device and notice that messages i am sending are received only if the app is running in background and not if the app is running in foreground.  Any idea what can be the cause of this? One other question. If i receive notifications in back ground and click on the them the app will open, but how do i manage to show the history of notifications in the app itself? I am using version 2.3.2 of the push notifications module.
asked
2 answers
1

Hi Ruurd, when the app is running in the background, the notification is delivered to the device's system tray. But when the app is running in the foreground the pushNotifications widget shows the message within your app itself. To my knowledge, this is the current implemenation of the pushNotifications widget. 

To debug your issue, you should check the location of the pushNotifications widget within the layout pages. The widget should be on every page (except anonymous) within your app. Second you can check the CSS that the widget uses by default. It uses the default alert-info class to show the message within your app.

To answer your second question. Currently there's no default functionality that shows a history of the notifications itself. We also needed some functionality that shows sent push notifications for audit purposes. To make this work you need to create an extra message entity, and add workflow to create a copy of the message etc.

Hope this helps, and let us know your findings.

answered
0

 

I have included the snippet in all default pages. See below the tablet_default.

answered