Comments (4)
Are you trying to pass in an array of registrationId
s to Sender#sendNoRetry
? What would be the point of that when you should just use Sender#sendNoRetryMulti
?
from php-gcm.
I'm talking about the payload data, not registrationId. I'm trying to send a data like this:
{ "foo": { "bar": "foobar" } }
Using sendNoRetryMulti I can, but I can't with sendNoRetry.
from php-gcm.
Sender::sendNoRetry converts getData to a GET-style query string. In this process, it blindly iterates over Message::getData and assumes it is a single-dimension array. This prevents the ability to pass multi-dimensional data through the message. It appears Google expects to get multi-dimensional data in dot notation when transmitted as form data instead of JSON, e.g., {"foo":{"bar":"foobar"}} would be foo.bar=foobar.
Fixes appear to be
a) convert Sender::sendNoRetry to use JSON in the request
b) parse getData more thoroughly converting it to dot notation
from php-gcm.
This was fixed in d459eab.
from php-gcm.
Related Issues (20)
- Google Cloud Messaging (GCM) Notification receiving with logs detail HOT 2
- GCM Group Notifications HOT 4
- Should be able to specify curl cainfo cert path HOT 1
- how to set notification payload? HOT 6
- Add support for sending topic messages HOT 1
- Simultaneous sending limit HOT 4
- wrong $retries variable HOT 1
- Support for Web Push Payload Encryption HOT 4
- Composer installs old version HOT 8
- Release 1.1.1 has outdated end point HOT 1
- Put a release onto composer? HOT 1
- Complex data in push message HOT 1
- How can I send Big Picture Style notification with this? HOT 1
- Support for Firebase Cloud Messaging (FCM) HOT 1
- I have a question about php-gcm. HOT 1
- Example usage
- please update readme code base has changed
- About your class
- Firebase server sends old messages
- Migration to FCM HOT 1
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-gcm.