Reputation: 334
when we just have notification (display message) which can be sent through firebase console, our onMessageReceived method of the FirebaseMessagingService is called when our app is in Foreground. And to have notification i created Notification builder which works fine. Only issue that i am facing is to retrieve the message content, since it is not a data notification, remotemessage.getData() is null and even remotemessage.getNotificationBody() is also null.
I have debug the program and remoteMessage is having one field which is storing the message sent but i am not able to retrieve it. Please help me.
Attached is the snapshot showing the required field of message sent from firebase console highlighted in yellow.
Upvotes: 1
Views: 766