Skip to content

Commit 2f140f9

Browse files
labtopiaAndroid (Google) Code Review
authored andcommitted
Merge "Doc change: GCM changes" into jb-dev
2 parents 8dc0ff0 + 4e11e3e commit 2f140f9

23 files changed

+257
-89
lines changed

docs/html/guide/google/gcm/adv.jd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ delivered right away unless the <code>delay_while_idle</code> flag is set to tru
5151

5252
<p>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 <code>delay_while_idle</code> 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 <code>time_to_live</code> flag is set.</p>
5353

54-
<p class="note"><strong>Note:</strong> When you set the <code>time_to_live</code> flag, you must also set <code>collapse_key</code>. Otherwise the message will be rejected as a bad request.</p>
5554
<p>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 <code>NotRegistered</code> error. See <a href="#unreg">How Unregistration Works</a> for more information.</p>
5655
<p>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.</p>
5756

docs/html/guide/google/gcm/gcm.jd

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,15 @@ page.title=GCM Architectural Overview
5757
</div>
5858

5959
<p>Google Cloud Messaging for Android (GCM) is a free service that helps
60-
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
61-
messages and delivery to the target Android application running on the target
62-
device.</p>
60+
developers send data from servers to their Android applications on Android
61+
devices. This could be a lightweight message telling the Android application
62+
that there is new data to be fetched from the server (for instance, a movie
63+
uploaded by a friend), or it could be a message containing up to 4kb of payload
64+
data (so apps like instant messaging can consume the message directly). The GCM
65+
service handles all aspects of queueing of messages and delivery to the target
66+
Android application running on the target device.</p>
67+
68+
6369
<p class="note"> To jump right into using GCM with your Android
6470
applications, see the instructions in <a href="gs.html">Getting Started</a>.</p>
6571

@@ -647,7 +653,7 @@ when the device is offline, so that only the last message gets sent to the
647653
client. This is intended to avoid sending too many messages to the phone when it
648654
comes back online. Note that since there is no guarantee of the order in which
649655
messages get sent, the &quot;last&quot; message may not actually be the last
650-
message sent by the application server. See <a href="adv.html#collapsible">Advanced Topics</a> for more discussion of this topic. Optional, unless you are using the <code>time_to_live</code> parameter&mdash;in that case, you must also specify a <code>collapse_key</code>.</td>
656+
message sent by the application server. See <a href="adv.html#collapsible">Advanced Topics</a> for more discussion of this topic. Optional.</td>
651657
</tr>
652658
<tr>
653659
<td><code>data</code></td>
@@ -665,7 +671,7 @@ sent. Optional. The default value is <code>false</code>, and must be a JSON bool
665671
</tr>
666672
<tr>
667673
<td><code>time_to_live</code></td>
668-
<td>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 <code>collapse_key</code>.</td>
674+
<td>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).</td>
669675
</tr>
670676
</table>
671677

docs/html/guide/google/gcm/gs.jd

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,14 @@ page.title=GCM: Getting Started
138138

139139
</ol>
140140
<p>This intent service will be called by the <code>GCMBroadcastReceiver</code> (which is is provided by GCM library), as shown in the next step. It must be a subclass of <code>com.google.android.gcm.GCMBaseIntentService</code>, must contain a public constructor, and should be named <code>my_app_package.GCMIntentService</code> (unless you use a subclass of <code>GCMBroadcastReceiver</code> that overrides the method used to name the service).</p>
141-
<h4><br>
142-
Step 3: Write the my_app_package.GCMIntentService class</h4>
141+
142+
<p>The intent service must also define its sender ID(s). It does this as follows:</p>
143+
<ul>
144+
<li>If the value is static, the service's default constructor should call <code>super(senderIds)</code>.</li>
145+
<li>If the value is dynamic, the service should override the <code>getSenderIds()</code> method.</li>
146+
</ul>
147+
148+
<h4>Step 3: Write the my_app_package.GCMIntentService class</h4>
143149
<p>Next write the <code>my_app_package.GCMIntentService</code> class, overriding the following callback methods (which are called by <code>GCMBroadcastReceiver</code>):<br>
144150
</p>
145151
<ul>

docs/html/guide/google/gcm/server-javadoc/allclasses-frame.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
5+
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
66
<TITLE>
77
All Classes
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2012-07-16">
10+
<META NAME="date" CONTENT="2012-08-29">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">
1313

docs/html/guide/google/gcm/server-javadoc/allclasses-noframe.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
5+
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
66
<TITLE>
77
All Classes
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2012-07-16">
10+
<META NAME="date" CONTENT="2012-08-29">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">
1313

docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:09 PDT 2012 -->
5+
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
66
<TITLE>
77
Constants
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2012-07-16">
10+
<META NAME="date" CONTENT="2012-08-29">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">
1313

docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
5+
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
66
<TITLE>
77
InvalidRequestException
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2012-07-16">
10+
<META NAME="date" CONTENT="2012-08-29">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">
1313

docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
5+
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
66
<TITLE>
77
Message.Builder
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2012-07-16">
10+
<META NAME="date" CONTENT="2012-08-29">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">
1313

docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
5+
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
66
<TITLE>
77
Message
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2012-07-16">
10+
<META NAME="date" CONTENT="2012-08-29">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">
1313

docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
5+
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
66
<TITLE>
77
MulticastResult
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2012-07-16">
10+
<META NAME="date" CONTENT="2012-08-29">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">
1313

0 commit comments

Comments
 (0)