When app is in background, the notification message is deliver by Notification, when the notification is tap, app is launch, how can i get the message body?
the intent is this:
Bundle[{google.sent_time=1470813025421, from=568540028909,
google.message_id=0:1470813025865549%31bd1c9631bd1c96,
collapse_key=com.google.firebase.quickstart.fcm}]
no message body in intent, only message id! Thanks!
try this
I am sorry but what you are trying to do is not possible.
Currently it's not possible to access the (body, title, icon ...) information of a
notification-message
from the activity that is launched when the notification is opened.You can instead access the data component of the notification message.
One possible alternative is to use
data-message
messages and create your own custom notification and custom logic.see
notification-message
vsdata-message
here:https://firebase.google.com/docs/cloud-messaging/concept-options#notifications_and_data_messages
PS: if would be useful if you could report a Feature Request through the firebase support page.
In this way the team can correctly prioritize future features. https://firebase.google.com/support/contact/bugs-features/