ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 206 forks source link

Why I can't add data with simply passing data json? #17

Closed lexer closed 11 years ago

lexer commented 12 years ago

In you API i should use addData method. I think it is much simplier to supply json to data property.

Or I am missing something?

tamsler commented 11 years ago

You could easily modify the addData() behavior in message.js to achieve this. I think there should also be some message validation to make sure that the payload doesn't exceed the current GCM 4kb limit.