From 510f69b31029876424a1395eab36d51f79ebe28c Mon Sep 17 00:00:00 2001 From: kmccormick Date: Fri, 15 Mar 2013 13:05:45 -0700 Subject: Doc Update: GCM cleanup Bug # 8144337, 8289556, 8289952, 7579225 Change-Id: Ibfc4a703a89572525b75e71ac2b5392c41bd1733 --- docs/html/google/gcm/gcm.jd | 34 ++++++++++++++++++++++++++++------ docs/html/google/gcm/gs.jd | 11 +++++++++-- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/docs/html/google/gcm/gcm.jd b/docs/html/google/gcm/gcm.jd index 11b5a6cda5fe..fb57a910dd25 100644 --- a/docs/html/google/gcm/gcm.jd +++ b/docs/html/google/gcm/gcm.jd @@ -149,7 +149,16 @@ it to receive messages. Once the Android application has the registration ID, it it to the 3rd-party application server, which uses it to identify each device that has registered to receive messages for a given Android application. In other words, a registration ID is tied to a particular Android application running on a particular -device. +device. +
+
+Note: If you use +backup and restore, +you should explicitly avoid backing up registration IDs. When you back up +a device, apps back up shared prefs indiscriminately. If you don't explicitly +exclude the GCM registration ID, it could get reused on a new device, +which would cause delivery errors. + Google User Account @@ -295,6 +304,13 @@ include: +

Note: This section describes how to +write an app without using the +helper libraries. +For details on writing +an app that uses the helper libraries (which is the recommended and +simpler approach), see GCM: Getting Started. +

Creating the Manifest

Every Android application must have an AndroidManifest.xml file (with @@ -585,6 +601,7 @@ ensures that the Android application cannot be installed in an environment in wh could not run properly. +

Role of the 3rd-party Application Server

Before you can write client Android applications that use the GCM feature, you must @@ -758,9 +775,14 @@ sent. Optional. The default value is false, and must be a JSON bool

collapse_key=score_update&time_to_live=108&delay_while_idle=1&data.score=4x8&data.time=15:16.2342&registration_id=42
   
-

Note: If your organization has a firewall that restricts the traffic to or from the Internet, you'll need to configure it to allow connectivity with GCM. The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but it sometimes uses 5229 and 5230. -GCM doesn't provide specific IPs. It changes IPs frequently. We recommend against using ACLs but if you must use them, take a broad approach such as the method suggested in this support link. -

+

Note: If your organization has a firewall +that restricts the traffic to or +from the Internet, you need to configure it to allow connectivity with GCM. +The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but +it sometimes uses 5229 and 5230. GCM doesn't provide specific IPs, so you should +allow your server to accept incoming connections from all IP addresses +contained in the IP blocks listed in Google's ASN of 15169.

+

Response format

@@ -770,7 +792,7 @@ GCM doesn't provide specific IPs. It changes IPs frequently. We recommend agains
  • The GCM server rejects the request.
  • -

    When the messge is processed successfully, the HTTP response has a 200 status and the body contains more information about the status of the message (including possible errors). When the request is rejected, +

    When the message is processed successfully, the HTTP response has a 200 status and the body contains more information about the status of the message (including possible errors). When the request is rejected, the HTTP response contains a non-200 status code (such as 400, 401, or 503).

    The following table summarizes the statuses that the HTTP response header might contain. Click the troubleshoot link for advice on how to deal with each type of error.

    @@ -825,7 +847,7 @@ the HTTP response contains a non-200 status code (such as 400, 401, or 503).

    Array of objects representing the status of the messages processed. The objects are listed in the same order as the request (i.e., for each registration ID in the request, its result is listed in the same index in the response) and they can have these fields:
    diff --git a/docs/html/google/gcm/gs.jd b/docs/html/google/gcm/gs.jd index 37ef684f8282..5d346413dab1 100644 --- a/docs/html/google/gcm/gs.jd +++ b/docs/html/google/gcm/gs.jd @@ -86,8 +86,15 @@ page.title=GCM: Getting Started

    Install the Helper Libraries

    To perform the steps described in the following sections, you must first install the -helper libraries. -From the SDK Manager, install Extras > Google Cloud Messaging for Android Library. This creates a gcm directory under YOUR_SDK_ROOT/extras/google/ containing these subdirectories: gcm-client, gcm-server, samples/gcm-demo-client, samples/gcm-demo-server, and samples/gcm-demo-appengine.

    +helper libraries. Note that while using the helper libraries is recommended, it is not required. See the GCM Architectural Overview for a description of how to write apps without using the helper libraries. + +

    To install the helper libraries, choose +Extras > Google Cloud Messaging for Android Library +from the SDK Manager. This creates a gcm directory under +YOUR_SDK_ROOT/extras/google/ containing these +subdirectories: gcm-client, gcm-server, +samples/gcm-demo-client, samples/gcm-demo-server, +and samples/gcm-demo-appengine.

    Note: If you don't see Extras > Google Cloud Messaging for Android Library in the SDK Manager, make sure you are running version 20 or higher. Be sure to restart the SDK Manager after updating it.

    -- cgit v1.2.3-59-g8ed1b