From 4e11e3e96260789dfe123281cf8edcaa9439841b Mon Sep 17 00:00:00 2001 From: Katie McCormick Date: Wed, 29 Aug 2012 15:10:00 -0700 Subject: [PATCH] Doc change: GCM changes Bug: 7072792 Change-Id: I718e407647571d093996139b857f703c104d4e4d --- docs/html/guide/google/gcm/adv.jd | 1 - docs/html/guide/google/gcm/gcm.jd | 16 +- docs/html/guide/google/gcm/gs.jd | 10 +- .../gcm/server-javadoc/allclasses-frame.html | 4 +- .../server-javadoc/allclasses-noframe.html | 4 +- .../google/android/gcm/server/Constants.html | 4 +- .../gcm/server/InvalidRequestException.html | 4 +- .../android/gcm/server/Message.Builder.html | 4 +- .../google/android/gcm/server/Message.html | 4 +- .../android/gcm/server/MulticastResult.html | 4 +- .../com/google/android/gcm/server/Result.html | 4 +- .../com/google/android/gcm/server/Sender.html | 6 +- .../android/gcm/server/package-frame.html | 4 +- .../android/gcm/server/package-summary.html | 4 +- .../android/gcm/server/package-tree.html | 4 +- .../gcm/server-javadoc/constant-values.html | 4 +- .../google/gcm/server-javadoc/default.css | 243 ++++++++++++++---- .../gcm/server-javadoc/deprecated-list.html | 4 +- .../google/gcm/server-javadoc/help-doc.html | 4 +- .../google/gcm/server-javadoc/index-all.html | 4 +- .../google/gcm/server-javadoc/index.html | 2 +- .../gcm/server-javadoc/overview-tree.html | 4 +- .../gcm/server-javadoc/serialized-form.html | 4 +- 23 files changed, 257 insertions(+), 89 deletions(-) diff --git a/docs/html/guide/google/gcm/adv.jd b/docs/html/guide/google/gcm/adv.jd index 217412819dd2b..aa66e25bdd11c 100644 --- a/docs/html/guide/google/gcm/adv.jd +++ b/docs/html/guide/google/gcm/adv.jd @@ -51,7 +51,6 @@ delivered right away unless the delay_while_idle flag is set to tru

If the device is not connected to GCM, the message will be stored until a connection is established (again respecting the collapse key rules). When a connection is established, GCM will deliver all pending messages to the device, regardless of the delay_while_idle flag. If the device never gets connected again (for instance, if it was factory reset), the message will eventually time out and be discarded from GCM storage. The default timeout is 4 weeks, unless the time_to_live flag is set.

-

Note: When you set the time_to_live flag, you must also set collapse_key. Otherwise the message will be rejected as a bad request.

Finally, when GCM attempts to deliver a message to the device and the application was uninstalled, GCM will discard that message right away and invalidate the registration ID. Future attempts to send a message to that device will get a NotRegistered error. See How Unregistration Works for more information.

Although is not possible to track the status of each individual message, the Google APIs Console stats are broken down by messages sent to device, messages collapsed, and messages waiting for delivery.

diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/guide/google/gcm/gcm.jd index 5515f31f4339b..c6f1a4e5ddc3c 100644 --- a/docs/html/guide/google/gcm/gcm.jd +++ b/docs/html/guide/google/gcm/gcm.jd @@ -57,9 +57,15 @@ page.title=GCM Architectural Overview

Google Cloud Messaging for Android (GCM) is a free service that helps -developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of - messages and delivery to the target Android application running on the target - device.

+developers send data from servers to their Android applications on Android +devices. This could be a lightweight message telling the Android application +that there is new data to be fetched from the server (for instance, a movie +uploaded by a friend), or it could be a message containing up to 4kb of payload +data (so apps like instant messaging can consume the message directly). The GCM +service handles all aspects of queueing of messages and delivery to the target +Android application running on the target device.

+ +

To jump right into using GCM with your Android applications, see the instructions in Getting Started.

@@ -647,7 +653,7 @@ when the device is offline, so that only the last message gets sent to the client. This is intended to avoid sending too many messages to the phone when it comes back online. Note that since there is no guarantee of the order in which messages get sent, the "last" message may not actually be the last -message sent by the application server. See Advanced Topics for more discussion of this topic. Optional, unless you are using the time_to_live parameter—in that case, you must also specify a collapse_key. +message sent by the application server. See Advanced Topics for more discussion of this topic. Optional. data @@ -665,7 +671,7 @@ sent. Optional. The default value is false, and must be a JSON bool time_to_live - How long (in seconds) the message should be kept on GCM storage if the device is offline. Optional (default time-to-live is 4 weeks, and must be set as a JSON number). If you use this parameter, you must also specify a collapse_key. + How long (in seconds) the message should be kept on GCM storage if the device is offline. Optional (default time-to-live is 4 weeks, and must be set as a JSON number). diff --git a/docs/html/guide/google/gcm/gs.jd b/docs/html/guide/google/gcm/gs.jd index 6f8598fcdb424..93eb79448e2c1 100644 --- a/docs/html/guide/google/gcm/gs.jd +++ b/docs/html/guide/google/gcm/gs.jd @@ -138,8 +138,14 @@ page.title=GCM: Getting Started

This intent service will be called by the GCMBroadcastReceiver (which is is provided by GCM library), as shown in the next step. It must be a subclass of com.google.android.gcm.GCMBaseIntentService, must contain a public constructor, and should be named my_app_package.GCMIntentService (unless you use a subclass of GCMBroadcastReceiver that overrides the method used to name the service).

-


- Step 3: Write the my_app_package.GCMIntentService class

+ +

The intent service must also define its sender ID(s). It does this as follows:

+ + +

Step 3: Write the my_app_package.GCMIntentService class

Next write the my_app_package.GCMIntentService class, overriding the following callback methods (which are called by GCMBroadcastReceiver):