-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Firebase Messaging: fix Android notification body and title not sent to Flutter #672
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it!
…On Wed, Jul 18, 2018 at 4:26 PM googlebot ***@***.***> wrote:
Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project (if not, look below for help).
Before we can look at your pull request, you'll need to sign a Contributor
License Agreement (CLA).
📝 *Please visit https://cla.developers.google.com/
<https://cla.developers.google.com/> to sign.*
Once you've signed (or fixed any issues), please reply here (e.g. I
signed it!) and we'll verify it.
------------------------------
What to do if you already signed the CLA Individual signers
- It's possible we don't have your GitHub username or you're using a
different email address on your commit. Check your existing CLA data
<https://cla.developers.google.com/clas> and verify that your email is
set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
Corporate signers
- Your company has a Point of Contact who decides which employees are
authorized to participate. Ask your POC to be added to the group of
authorized contributors. If you don't know who your Point of Contact is,
direct the Google project maintainer to go/cla#troubleshoot (Public
version <https://opensource.google.com/docs/cla/#troubleshoot>).
- The email used to register you as an authorized contributor must be
the email used for the Git commit. Check your existing CLA data
<https://cla.developers.google.com/clas> and verify that your email is
set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
- The email used to register you as an authorized contributor must
also be attached to your GitHub account
<https://github.com/settings/emails>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#672 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AZp83HeC9E61jBRxdAOFkcMNrgxQGBFWks5uH5nlgaJpZM4VVTtE>
.
|
CLAs look good, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bump the version number of the plugin and add a note to the CHANGELOG.
Map<String, Object> content = new HashMap<>(); | ||
content.put("data", message.getData()); | ||
|
||
RemoteMessage.Notification notification = message.getNotification(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since notification can be null if the a data-message is sent, please check for null before adding the properties of the Notification to the content passed to the Dart side.
@bkayfitz-cara We had some formatting issues last week, would you mind rebasing on master, all builds should pass and I'll be happy to merge. |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@bkayfitz-cara Would you be able to resolve the conflicts and then I'll be happy to merge. Thanks for the PR. |
CLAs look good, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, please fix nit and I'll merge.
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove unnecessary empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bkayfitz-cara fixed nit so I'll merge. Thanks very much for this PR.
…to Flutter (flutter#672) * sending notification title and body to flutter * Safety checks for null pointer exceptions * Use remote data scheme on dart side
…to Flutter (flutter#672) * sending notification title and body to flutter * Safety checks for null pointer exceptions * Use remote data scheme on dart side
…ot sent to Flutter (flutter#672)" This reverts commit 6956308.
…to Flutter (flutter#672) * sending notification title and body to flutter * Safety checks for null pointer exceptions * Use remote data scheme on dart side
The Firebase Messaging plugin for Android only seems to send the custom properties that can be included with a push notification to Flutter - it doesn't send any of the core message components, like the title or body.
For example, if you send this message:
title: My Notification
body: Hello World!
customProperty: foo
The flutter plugin will only receive
{"customProperty": "foo"}
This is not an issue one the iOS side, which sends the entire apns payload to Flutter.
This change just adds the title and body properties for now, but maybe other properties should be added as well?