Skip to content

Conversation

@princenaman
Copy link

Added missing fields for title and body.
#160

Added missing fields for title and body.
fechanique#160
No notification object here.
Will have to send contents in data array.

Map<String, Object> data = new HashMap<String, Object>();
data.put("wasTapped", false);
data.put("title", remoteMessage.getNotification().getTitle());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add a null check for " remoteMessage.getNotification()", because you send only data in FCM API , then background notification works - explained here. So in that case, 'remoteMessage.getNotification()' will be null and it will break.

@CharlieIGG
Copy link

Why hasn't this been merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants