Hi Berry van Rooijen
I already worked on this When the app is backgrounded, Android system consumes the notification payload and shows it in the tray. The app does not receive the notification object via the normal message callback; only the data payload is guaranteed to be delivered to your app (or made available as Intent extras when the notification is tapped). That’s why $Notification/Title and Body are empty on Android: your Mendix module is reading andriod.notification.* which isn’t available to the app when backgrounded.
I solved it by using by Sending title/body inside data :duplicate title and body into the data object so your app can always read them.
sample:
{
"message": {
"token":"{1}",
"data": {
"guid":"{5}",
"actionName":"{4}",
"title":"{2}",
"body":"{3}"
},
"android": {
"notification": {
"title":"{2}",
"body":"{3}",
"notification_count":"{6}"
}
}
}
}
Then change your Mendix JS action to use android.notification.title ?? data.title (i.e. fallback to data.title).
I hope this helps!!