To send a message from FCM backend, we have this view :
I wanna to get the message label (libellé du message) from RemoteMessage
. When I debug for the field, the content in the message is labeled as google.c.a.c_l
, which I think is an internal field.
First, I just wonder the same as your question. But after read the document here and played around with it, I found that:
remoteMessage.getNotification().getBody()
for notification's message body (from Message text/Texte du message), remoteMessage.getNotification().getTitle()
for notitifcation's title (from Advanced options), remoteMessage.getData()
for data payload (from Advanced options).Try to get it with remoteMessage.getNotification().getTitle()
. However, check before if remoteMessage.getNotification() != null
.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With