Closed aryehischechter closed 8 years ago
After upgrading from 0.9.12 to 0.11.1 clients have stopped receiving the data.
sample code is:
var gcm = require('node-gcm'), gcmMessage = new gcm.Message(); var sender = new gcm.Sender(KEY, { timeout: TIMEOUT }); gcmMessage.data = { j: "Will we get this?", id: "abcd-efgh" }; sender.send(gcmMessage, tokensArray, 4, callback);
the client only receives:
flags: 16 action: com.google.android.c2dm.intent.RECEIVE key: [from] value: [ABCXYZ] key: [android.support.content.wakelockid] value: [11] key: [collapse_key] value: [do_not_collapse]
found the changes to send, where you do toJSON, which will ignore the way we were adding data to the gcm message object. I should be using addData. closing.
Glad you found the change :)
After upgrading from 0.9.12 to 0.11.1 clients have stopped receiving the data.
sample code is:
the client only receives: