Closed philvessey closed 9 years ago
While im at it is there anyway to make the notification text multiLine also? This would be the information in $contentText?
Hi Phil,
What version of the extension are you using?
PushNotifications.service.version
I've confirmed the latest version from github (2.6.Android.2.2
) doesn't show a notification with just 'message' in the data.
Thats correct but when the application is already running and im listening for the notification with PushNotificationEvent.FOREGROUND_NOTIFICATION with just the message in the data the app doesnt seem to process the notification arriving.
Its as if removing those fields completely disables the notification. This is with 2.6.Android.2.2 on Android 5.0
If its not something thats technically possible im quite happy still showing the actual notification (which is what im doing now) just wondered if there were other options.
Ah, yes the foreground notification is only fired when the notification is displayed. Listen for this event instead:
PushNotificationEvent.NOTIFICATION
Thanks Michael - changing the type of the event has sorted the issue. Its now running as I want it too.
Sorry about that, I should have suggested that on Twitter.
Hi
Using the code below.
What I want to achieve is for the device to receive the notification but not show anything in the notification bar. A silent notification if you will that can trigger the device to sync when its running and do nothing when its not.
The notification works fine when including $tickerText, $contentTitle and $contentText etc