am 2f140f96: Merge "Doc change: GCM changes" into jb-dev

* commit '2f140f9692c3f8e8ae278839637ff5f72d145c60':
  Doc change: GCM changes
This commit is contained in:
Katie McCormick
2012-09-13 09:39:50 -07:00
committed by Android Git Automerger
23 changed files with 257 additions and 89 deletions

View File

@@ -51,7 +51,6 @@ delivered right away unless the <code>delay_while_idle</code> flag is set to tru
<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>
<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>
<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>
<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>

View File

@@ -57,9 +57,15 @@ page.title=GCM Architectural Overview
</div>
<p>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.</p>
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.</p>
<p class="note"> To jump right into using GCM with your Android
applications, see the instructions in <a href="gs.html">Getting Started</a>.</p>
@@ -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 &quot;last&quot; message may not actually be the last
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>
message sent by the application server. See <a href="adv.html#collapsible">Advanced Topics</a> for more discussion of this topic. Optional.</td>
</tr>
<tr>
<td><code>data</code></td>
@@ -665,7 +671,7 @@ sent. Optional. The default value is <code>false</code>, and must be a JSON bool
</tr>
<tr>
<td><code>time_to_live</code></td>
<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>
<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>
</tr>
</table>

View File

@@ -138,8 +138,14 @@ page.title=GCM: Getting Started
</ol>
<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>
<h4><br>
Step 3: Write the my_app_package.GCMIntentService class</h4>
<p>The intent service must also define its sender ID(s). It does this as follows:</p>
<ul>
<li>If the value is static, the service's default constructor should call <code>super(senderIds)</code>.</li>
<li>If the value is dynamic, the service should override the <code>getSenderIds()</code> method.</li>
</ul>
<h4>Step 3: Write the my_app_package.GCMIntentService class</h4>
<p>Next write the <code>my_app_package.GCMIntentService</code> class, overriding the following callback methods (which are called by <code>GCMBroadcastReceiver</code>):<br>
</p>
<ul>

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
All Classes
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
All Classes
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:09 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Constants
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
InvalidRequestException
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Message.Builder
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Message
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
MulticastResult
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Result
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Sender
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">
@@ -591,6 +591,8 @@ protected static java.lang.String <B>getString</B>(java.io.InputStream&nbsp;stre
<p>
If the stream ends in a newline character, it will be stripped.
<p>
If the stream is null, returns an empty string.
<P>
<DD><DL>

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
com.google.android.gcm.server
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
com.google.android.gcm.server
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
com.google.android.gcm.server Class Hierarchy
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Constant Field Values
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">

View File

@@ -530,12 +530,12 @@ h3:target {
}
.design ol {
counter-reset: item; }
.design ol li {
.design ol>li {
font-size: 14px;
line-height: 20px;
list-style-type: none;
position: relative; }
.design ol li:before {
.design ol>li:before {
content: counter(item) ". ";
counter-increment: item;
position: absolute;
@@ -561,16 +561,18 @@ h3:target {
content: "9. "; }
.design ol li.value-10:before {
content: "10. "; }
.design .with-callouts ol li {
.design .with-callouts ol>li {
list-style-position: inside;
margin-left: 0; }
.design .with-callouts ol li:before {
.design .with-callouts ol>li:before {
display: inline;
left: -20px;
float: left;
width: 17px;
color: #33b5e5;
font-weight: 500; }
.design .with-callouts ul>li {
list-style-position: outside; }
/* special list items */
li.no-bullet {
@@ -1079,22 +1081,71 @@ color-stop(50%, #acbc00), color-stop(50%, #bdde00), color-stop(100%, #bdde00));
Print Only
========================================================================== */
@media print {
a {
color: inherit;
}
.nav-x, .nav-y {
display: none;
}
.str { color: #060; }
.kwd { color: #006; font-weight: bold; }
.com { color: #600; font-style: italic; }
.typ { color: #404; font-weight: bold; }
.lit { color: #044; }
.pun { color: #440; }
.pln { color: #000; }
.tag { color: #006; font-weight: bold; }
.atn { color: #404; }
.atv { color: #060; }
/* configure printed page */
@page {
margin: 0.75in 1in;
widows: 4;
orphans: 4;
}
/* reset spacing metrics */
html, body, .wrap {
margin: 0 !important;
padding: 0 !important;
width: auto !important;
}
/* leave enough space on the left for bullets */
body {
padding-left: 20px !important;
}
#doc-col {
margin-left: 0;
}
/* hide a bunch of non-content elements */
#header, #footer, #nav-x, #side-nav,
.training-nav-top, .training-nav-bottom,
#doc-col .content-footer,
.nav-x, .nav-y,
.paging-links,
a.totop {
display: none !important;
}
/* remove extra space above page titles */
#doc-col .content-header {
margin-top: 0;
}
/* bump up spacing above subheadings */
h2 {
margin-top: 40px !important;
}
/* print link URLs where possible and give links default text color */
p a:after {
content: " (" attr(href) ")";
font-size: 80%;
}
p a {
word-wrap: break-word;
}
a {
color: inherit;
}
/* syntax highlighting rules */
.str { color: #060; }
.kwd { color: #006; font-weight: bold; }
.com { color: #600; font-style: italic; }
.typ { color: #404; font-weight: bold; }
.lit { color: #044; }
.pun { color: #440; }
.pln { color: #000; }
.tag { color: #006; font-weight: bold; }
.atn { color: #404; }
.atv { color: #060; }
}
/* =============================================================================
@@ -2033,8 +2084,11 @@ div.toggle-content.closed .toggle-content-toggleme {
#jd-content img.toggle-content-img {
margin:0 5px 5px 0;
}
div.toggle-content > p {
padding:0 0 5px;
div.toggle-content p {
margin:10px 0 0;
}
div.toggle-content-toggleme {
padding:0 0 0 15px;
}
@@ -2145,14 +2199,9 @@ table.blank th, table.blank td {
.nolist {
list-style:none;
padding:0;
margin:0 0 1em 1em;
margin-left:0;
}
.nolist li {
padding:0 0 2px;
margin:0;
}
pre.classic {
background-color:transparent;
@@ -2180,6 +2229,12 @@ p.table-caption {
color:#666;
}
div.note,
div.caution,
div.warning {
margin: 0 0 15px;
}
p.note, div.note,
p.caution, div.caution,
p.warning, div.warning {
@@ -2898,10 +2953,6 @@ ul#search_filtered {
/* SEARCH RESULTS */
/* disable twiddle and size selectors for left column */
#leftSearchControl div {
padding:0;
}
#leftSearchControl .gsc-twiddle {
background-image : none;
@@ -3475,7 +3526,7 @@ EndColorStr='#ececec');
.morehover:hover {
opacity:1;
height:345px;
height:385px;
width:268px;
-webkit-transition-property:height, -webkit-opacity;
}
@@ -3489,7 +3540,7 @@ EndColorStr='#ececec');
.morehover .mid {
width:228px;
background:url(../images/more_mid.png) repeat-y;
padding:10px 20px 10px 20px;
padding:10px 20px 0 20px;
}
.morehover .mid .header {
@@ -3598,15 +3649,19 @@ a.download-sdk {
padding-top: 14px;
}
#nav-x .wrap {
min-height:34px;
}
#nav-x .wrap,
#searchResults.wrap {
max-width:940px;
border-bottom:1px solid #CCC;
min-height:34px;
}
#searchResults.wrap #leftSearchControl {
min-height:700px
}
.nav-x {
margin-left:0;
margin-bottom:0;
@@ -3762,7 +3817,8 @@ a.download-sdk {
height: 300px;
}
.slideshow-develop img.play {
width:350px;
max-width:350px;
max-height:240px;
margin:20px 0 0 90px;
-webkit-transform: perspective(800px ) rotateY( 35deg );
box-shadow: -16px 20px 40px rgba(0, 0, 0, 0.3);
@@ -3817,6 +3873,7 @@ a.download-sdk {
.feed .feed-nav li {
list-style: none;
float: left;
height: 21px; /* +4px bottom border = 25px; same as .feed-nav */
margin-right: 25px;
cursor: pointer;
}
@@ -3969,21 +4026,24 @@ a.download-sdk {
.landing-docs {
margin:20px 0 0;
}
.landing-banner {
height:280px;
}
.landing-banner .col-6:first-child,
.landing-docs .col-6:first-child {
.landing-docs .col-6:first-child,
.landing-docs .col-12 {
margin-left:0;
min-height:280px;
}
.landing-banner .col-6:last-child,
.landing-docs .col-6:last-child {
.landing-docs .col-6:last-child,
.landing-docs .col-12 {
margin-right:0;
}
.landing-banner h1 {
margin-top:0;
}
.landing-docs {
clear:left;
}
.landing-docs h3 {
font-size:14px;
line-height:21px;
@@ -4002,4 +4062,99 @@ a.download-sdk {
.plusone {
float:right;
}
}
/************* HOME/LANDING PAGE *****************/
.slideshow-home {
height: 500px;
width: 940px;
border-bottom: 1px solid #CCC;
position: relative;
margin: 0;
}
.slideshow-home .frame {
width: 940px;
height: 500px;
}
.slideshow-home .content-left {
float: left;
text-align: center;
vertical-align: center;
margin: 0 0 0 35px;
}
.slideshow-home .content-right {
margin: 80px 0 0 0;
}
.slideshow-home .content-right p {
margin-bottom: 10px;
}
.slideshow-home .content-right p:last-child {
margin-top: 15px;
}
.slideshow-home .content-right h1 {
padding:0;
}
.slideshow-home .item {
height: 500px;
width: 940px;
}
.home-sections {
padding: 30px 20px 20px;
margin: 20px 0;
background: -webkit-linear-gradient(top, #F6F6F6,#F9F9F9);
}
.home-sections ul {
margin: 0;
}
.home-sections ul li {
float: left;
display: block;
list-style: none;
width: 170px;
height: 35px;
border: 1px solid #ccc;
background: white;
margin-right: 10px;
border-radius: 1px;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
box-shadow: 1px 1px 5px #EEE;
-webkit-box-shadow: 1px 1px 5px #EEE;
-moz-box-shadow: 1px 1px 5px #EEE;
background: white;
}
.home-sections ul li:hover {
background: #F9F9F9;
border: 1px solid #CCC;
}
.home-sections ul li a,
.home-sections ul li a:hover {
font-weight: bold;
margin-top: 8px;
line-height: 18px;
float: left;
width: 100%;
text-align: center;
color: #09c !important;
}
.home-sections ul li a {
font-weight: bold;
margin-top: 8px;
line-height: 18px;
float: left;
width:100%;
text-align:center;
}
.home-sections ul li img {
float: left;
margin: -8px 0 0 10px;
}
.home-sections ul li.last {
margin-right: 0px;
}
.fullpage #footer {
margin-top: -40px;
}

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Deprecated List
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
API Help
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Index
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="./default.css" TITLE="Style">

View File

@@ -2,7 +2,7 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Mon Jul 16 14:12:10 PDT 2012-->
<!-- Generated by javadoc on Wed Aug 29 14:55:34 PDT 2012-->
<TITLE>
Generated Documentation (Untitled)
</TITLE>

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Class Hierarchy
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">

View File

@@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:12:10 PDT 2012 -->
<!-- Generated by javadoc (build 1.6.0_26) on Wed Aug 29 14:55:34 PDT 2012 -->
<TITLE>
Serialized Form
</TITLE>
<META NAME="date" CONTENT="2012-07-16">
<META NAME="date" CONTENT="2012-08-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="default.css" TITLE="Style">