I have used cURL phpHere is my code:
{"multicast_id":6086117185750372243,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"Unavailable"}]}After making the encoded json data somewhat closer to the sample on http://developer.android.com/guide/google/gcm/adv.html :{"delay_while_idle": true, "collapse_key": "Event", "time_to_live": 86400, "registration_ids": ["<mykey>"], "data": {"message": "Testing"}}I'm still getting 'Unavailable' ... any news on this issue? :)
On Wednesday, July 4, 2012 9:50:02 AM UTC+2, JonathanC wrote:Hey guys,I'm experiencing similar issues:2012-07-04 09:45:04+0200 [-] Sending: {"data": {"message": ["c\u00e6mera 7318952 - is nu online en klaar voor gebruik"]}, "registration_ids": ["<mykey>"]}2012-07-04 09:45:04+0200 [-] AndroidNotificationSender:send:120 Sent.2012-07-04 09:45:04+0200 [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] [Droid] Message transmit response:2012-07-04 09:45:04+0200 [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] {"multicast_id":7938595614873647090,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"Unavailable"}]}2012-07-04 09:45:04+0200 [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] Finished2012-07-04 09:45:04+0200 [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] [Droid] Message transmit response:2012-07-04 09:45:04+0200 [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] {"multicast_id":7614338315620730041,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"Unavailable"}]}2012-07-04 09:45:04+0200 [HTTP11ClientProtocol (TLSMemoryBIOProtocol),client] FinishedDid I encode the data incorrectly?Friendly greetings,Jonathan
com.google.android.gcm.demo.server.InvalidRequestException: HTTP Status Code: 401() com.google.android.gcm.demo.server.Sender.sendNoRetry(Sender.java:184) com.google.android.gcm.demo.server.Sender.send(Sender.java:121) com.google.android.gcm.demo.server.SendAllMessagesServlet.doPost(SendAllMessagesServlet.java:84) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.35 logs.