Comments (5)
Hi @rolinger, it could be that Google changed the output. Because I don't actually use this package a lot could you create a merge request to change the documentation? Thanks!
from php-fcm.
@EdwinHoksberg I am rereading FCM documentation this morning. It turns out your documentation on expected responses is not wrong - there are multiple types of responses based on message type. There are 3 different types of protocols to communicate push notification messages and I am not fully understanding the difference between the three.
- HTTP v1 API - I don't fully understand this one - this might be client APP direct to FCM server API - not certain though
- XMPP Server protocol - I think this is just an xml version of the json oriented protocol.
- Legacy HTTP Server Protocol - app server to client app via FCM. This is whats being used in this fcm-php repository, not certain why they refer to it as
legacy
though
The below are references to the Legacy HTTP Server Protocol
- Sets up who you are trying to communicate with (IDs, Topics, etc) https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream-http-messages-json
- This defines the message /
notfication
payload (ie: sound,icon, badge, etc): Notice, there are 2 tables: 2a for iOS and 2b for Android - finding the overlap is probably the better/universal way to go: https://firebase.google.com/docs/cloud-messaging/http-server-ref#notification-payload-support- The response messages:
a. https://firebase.google.com/docs/cloud-messaging/http-server-ref#interpret-downstream
b. Table 5:to
orregistration_ids
JSON response (this is whats defined in your documentation
c. Table 6:topic
JSON response - this is what I am getting when sending messages to my groups
d. Table 7 (Success) & Table 8 (Error) - responses to plain text (non JSON) HTTP messages
Your documentation is right...I just need to add additional documentation for both how to send notifications to a topic
and for the topic
responses.
from php-fcm.
@EdwinHoksberg In our php code, do these needed to be added per platform? - or does FCM just ignore the options in notifications that are/aren't supported by each platform? Lets add support for all of this - make this repository useful for everyone.
iOS only:
* badge
* subtitle
Android only:
* tag
* color (added)
* android_channel_id
* icon (added)
Both:
* title (done)
* body (done)
* sound (added)
* click_action
* body_loc_key
* body_loc_args
* title_loc_key
* title_loc_args
from php-fcm.
Added support for all of the following and also updated and clarified the Message docs, you should be able to merge them now.
iOS only:
- badge (added)
- subtitle (added)
Android only:
- tag (added)
- color (added)
- icon (added)
Both:
- title (done)
- body (done)
- sound (added)
from php-fcm.
closing this thread, opening a new master with all combined.
from php-fcm.
Related Issues (20)
- Internal server error HOT 6
- FCM: Migrate from legacy HTTP to HTTP v1 HOT 7
- 411 Length Required when sending push notifications HOT 11
- Documentation not consistent with composer package HOT 8
- Increase automated test coverage to 100%
- Android Notification channel id HOT 11
- Guzzle option, made a bit of a mess of the commit / merge HOT 2
- Sending to multiple topics fails HOT 4
- Improve documentation
- If you add more than five topics in FCM, the push doesn't send
- Tag a new version for Guzzle 7 HOT 5
- Optional Laravel support HOT 3
- Priority settings missing? HOT 4
- Add TTL in Notification? HOT 1
- addTopic in && non only in || HOT 9
- If you send a data only push, and empty message is sent HOT 1
- Not Registered in Results => remove device_id HOT 3
- content_available field HOT 1
- Feature request: set time out value HOT 1
- Missing collapse key HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-fcm.