Hi all.

I'm making an application with a server (web) part and a client part in 
android. The web part is responsible for registering the device and send 
messages to the device using GCM.

The problem comes when I try to send a payload message to the mobile client 
application, the payload value comes as null.

The server code is as follows:

Message message = *new *Message.Builder().collapseKey("1"
).timeToLive(3).delayWhileIdle(*true*).addData("payload", "payload"
).build();

System.*out*.println(message.getData().get("payload"));

Result result = sender.send(message, registrationId, 5);

When printing on screen on the server, the result of payload value is 
"payload", but its value is null on the client:

String newMessage = intent.getExtras().getString(*"payload"*);
System.*out*.println(newMessage);

Anyone know why this happens? How should I do it?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to