From 13d7ea464ec7947a0c55cd778c8b2bacc9d0745d Mon Sep 17 00:00:00 2001
From: kmccormick The GCM Cloud Connection Server (CCS) is an XMPP endpoint that provides a
+ The Google Cloud Messaging (GCM) Cloud Connection Server (CCS) is an XMPP endpoint that provides a
persistent, asynchronous, bidirectional connection to Google servers. The
connection can be used to send and receive messages between your server and
your users' GCM-connected devices. Note: The content in this document
+applies to
+GCM with Chrome apps as well as Android.
+
You can continue to use the HTTP request mechanism to send messages to GCM
servers, side-by-side with CCS which uses XMPP. Some of the benefits of CCS include:
Quota exceeded:
- -<message>
- <gcm xmlns="google:mobile:data">
- {
- "message_type":"nack",
- "message_id":"msgId1",
- "from":"APA91bHFOtaQGSwupt5l1og",
- "error":"QUOTA_EXCEEDED",
- "error_description":"Short-term downstream quota exceeded for this registration id"
- }
- </gcm>
-</message>
-
-
-
The following table lists NACK error codes. Unless otherwise indicated, a NACKed message should not be retried. Unexpected NACK error codes should be treated the same as {@code INTERNAL_SERVER_ERROR}.
@@ -312,11 +300,11 @@ message should be immediately retried over another connection.You can use upstream messaging to get receipt notifications, confirming -that a given message was sent to a device. Your 3rd-party app server receives the receipt -notification from CCS once the message has been sent to the device.
+You can use upstream messaging to get delivery receipts (sent from CCS to +your 3rd party app server) when +a device confirms that it received a message sent by CCS.
To enable this feature, the message your 3rd-party app server sends to CCS must include
a field called "delivery_receipt_requested". When this field is set to
-true, CCS sends a return receipt. Here is an XMPP stanza containing a JSON
+true, CCS sends a delivery receipt when a device confirms that it received a particular message.
Here is an XMPP stanza containing a JSON
message with "delivery_receipt_requested" set to true:
<message id=""> @@ -457,8 +447,10 @@ message with-"delivery_receipt_requested"set totr </message>
Here is an example of a receipt notification message that CCS sends back to your 3rd-party -app server:
+ + +Here is an example of the delivery receipt that CCS sends to tell your 3rd-party +app server that a device received a message that CCS sent it:
<message id=""> @@ -483,12 +475,12 @@ app server:
dr: prefix. Your 3rd-party app server must send an ACK back with this ID,
+dr2: prefix. Your 3rd-party app server must send an ACK back with this ID,
which in this example is {@code dr2:m-1366082849205}.