-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.x] Add support for setting badge count on iOS #41
Conversation
if (isset($this->badgeCount)) { | ||
$fields['notification']['badge'] = $this->badgeCount; | ||
} | ||
if (isset($this->contentAvailable)) { | ||
$fields['notification']['content_available'] = $this->contentAvailable; | ||
} |
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.
if (isset($this->badgeCount)) { | |
$fields['notification']['badge'] = $this->badgeCount; | |
} | |
if (isset($this->contentAvailable)) { | |
$fields['notification']['content_available'] = $this->contentAvailable; | |
} | |
if (isset($this->badgeCount)) { | |
$fields['notification']['badge'] = $this->badgeCount; | |
} | |
if (isset($this->contentAvailable)) { | |
$fields['notification']['content_available'] = $this->contentAvailable; | |
} | |
@lagerroos Thanks for your contribution. Can you also add documentation to the README file? |
I just saw that the 2 methods are only for IOS, so it makes sense to use https://firebase.google.com/docs/cloud-messaging/http-server-ref |
@gentritabazi01 But unfortunately it does not work from |
This PR allows the user to attach a badge count, in other words, the number of unread notifications on an app icon. It also allows sending background updates through Firebase, e.g. to wake up the app from a sleeping state.