| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0_26) on Mon Jul 16 14:13:36 PDT 2012 --> |
| <TITLE> |
| GCMRegistrar |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2012-07-16"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../default.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="GCMRegistrar"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/google/android/gcm/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../com/google/android/gcm/GCMConstants.html" title="class in com.google.android.gcm"><B>PREV CLASS</B></A> |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?com/google/android/gcm/GCMRegistrar.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="GCMRegistrar.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| com.google.android.gcm</FONT> |
| <BR> |
| Class GCMRegistrar</H2> |
| <PRE> |
| java.lang.Object |
| <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.android.gcm.GCMRegistrar</B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT><PRE>public final class <B>GCMRegistrar</B><DT>extends java.lang.Object</DL> |
| </PRE> |
| |
| <P> |
| Utilities for device registration. |
| <p> |
| <strong>Note:</strong> this class uses a private <CODE>SharedPreferences</CODE> |
| object to keep track of the registration token. |
| <P> |
| |
| <P> |
| <HR> |
| |
| <P> |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#DEFAULT_ON_SERVER_LIFESPAN_MS">DEFAULT_ON_SERVER_LIFESPAN_MS</A></B></CODE> |
| |
| <BR> |
| Default lifespan (7 days) of the <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#isRegisteredOnServer(Context)"><CODE>isRegisteredOnServer(Context)</CODE></A> |
| flag until it is considered expired.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#checkDevice(Context)">checkDevice</A></B>(Context context)</CODE> |
| |
| <BR> |
| Checks if the device has the proper dependencies installed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#checkManifest(Context)">checkManifest</A></B>(Context context)</CODE> |
| |
| <BR> |
| Checks that the application manifest is properly configured.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static long</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#getRegisterOnServerLifespan(Context)">getRegisterOnServerLifespan</A></B>(Context context)</CODE> |
| |
| <BR> |
| Gets how long (in milliseconds) the <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#isRegistered(Context)"><CODE>isRegistered(Context)</CODE></A> |
| property is valid.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static java.lang.String</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#getRegistrationId(Context)">getRegistrationId</A></B>(Context context)</CODE> |
| |
| <BR> |
| Gets the current registration id for application on GCM service.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#isRegistered(Context)">isRegistered</A></B>(Context context)</CODE> |
| |
| <BR> |
| Checks whether the application was successfully registered on GCM |
| service.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#isRegisteredOnServer(Context)">isRegisteredOnServer</A></B>(Context context)</CODE> |
| |
| <BR> |
| Checks whether the device was successfully registered in the server side, |
| as set by <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#setRegisteredOnServer(Context, boolean)"><CODE>setRegisteredOnServer(Context, boolean)</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#onDestroy(Context)">onDestroy</A></B>(Context context)</CODE> |
| |
| <BR> |
| Clear internal resources.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#register(Context, java.lang.String...)">register</A></B>(Context context, |
| java.lang.String... senderIds)</CODE> |
| |
| <BR> |
| Initiate messaging registration for the current application.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#setRegisteredOnServer(Context, boolean)">setRegisteredOnServer</A></B>(Context context, |
| boolean flag)</CODE> |
| |
| <BR> |
| Sets whether the device was successfully registered in the server side.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#setRegisterOnServerLifespan(Context, long)">setRegisterOnServerLifespan</A></B>(Context context, |
| long lifespan)</CODE> |
| |
| <BR> |
| Sets how long (in milliseconds) the <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#isRegistered(Context)"><CODE>isRegistered(Context)</CODE></A> |
| flag is valid.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#unregister(Context)">unregister</A></B>(Context context)</CODE> |
| |
| <BR> |
| Unregister the application.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="DEFAULT_ON_SERVER_LIFESPAN_MS"><!-- --></A><H3> |
| DEFAULT_ON_SERVER_LIFESPAN_MS</H3> |
| <PRE> |
| public static final long <B>DEFAULT_ON_SERVER_LIFESPAN_MS</B></PRE> |
| <DL> |
| <DD>Default lifespan (7 days) of the <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#isRegisteredOnServer(Context)"><CODE>isRegisteredOnServer(Context)</CODE></A> |
| flag until it is considered expired. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#com.google.android.gcm.GCMRegistrar.DEFAULT_ON_SERVER_LIFESPAN_MS">Constant Field Values</A></DL> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="checkDevice(Context)"><!-- --></A><H3> |
| checkDevice</H3> |
| <PRE> |
| public static void <B>checkDevice</B>(Context context)</PRE> |
| <DL> |
| <DD>Checks if the device has the proper dependencies installed. |
| <p> |
| This method should be called when the application starts to verify that |
| the device supports GCM. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>context</CODE> - application context. |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.UnsupportedOperationException</CODE> - if the device does not support GCM.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="checkManifest(Context)"><!-- --></A><H3> |
| checkManifest</H3> |
| <PRE> |
| public static void <B>checkManifest</B>(Context context)</PRE> |
| <DL> |
| <DD>Checks that the application manifest is properly configured. |
| <p> |
| A proper configuration means: |
| <ol> |
| <li>It creates a custom permission called |
| <code>PACKAGE_NAME.permission.C2D_MESSAGE</code>. |
| <li>It defines at least one <CODE>BroadcastReceiver</CODE> with category |
| <code>PACKAGE_NAME</code>. |
| <li>The <CODE>BroadcastReceiver</CODE>(s) uses the |
| permission. |
| <li>The <CODE>BroadcastReceiver</CODE>(s) handles the 3 GCM intents |
| (, |
| , |
| and ). |
| </ol> |
| ...where <code>PACKAGE_NAME</code> is the application package. |
| <p> |
| This method should be used during development time to verify that the |
| manifest is properly set up, but it doesn't need to be called once the |
| application is deployed to the users' devices. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>context</CODE> - application context. |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.IllegalStateException</CODE> - if any of the conditions above is not met.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="register(Context, java.lang.String...)"><!-- --></A><H3> |
| register</H3> |
| <PRE> |
| public static void <B>register</B>(Context context, |
| java.lang.String... senderIds)</PRE> |
| <DL> |
| <DD>Initiate messaging registration for the current application. |
| <p> |
| The result will be returned as an |
| <A HREF="../../../../com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK"><CODE>GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK</CODE></A> intent with |
| either a <A HREF="../../../../com/google/android/gcm/GCMConstants.html#EXTRA_REGISTRATION_ID"><CODE>GCMConstants.EXTRA_REGISTRATION_ID</CODE></A> or |
| <A HREF="../../../../com/google/android/gcm/GCMConstants.html#EXTRA_ERROR"><CODE>GCMConstants.EXTRA_ERROR</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>context</CODE> - application context.<DD><CODE>senderIds</CODE> - Google Project ID of the accounts authorized to send |
| messages to this application. |
| <DT><B>Throws:</B> |
| <DD><CODE>java.lang.IllegalStateException</CODE> - if device does not have all GCM |
| dependencies installed.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unregister(Context)"><!-- --></A><H3> |
| unregister</H3> |
| <PRE> |
| public static void <B>unregister</B>(Context context)</PRE> |
| <DL> |
| <DD>Unregister the application. |
| <p> |
| The result will be returned as an |
| <A HREF="../../../../com/google/android/gcm/GCMConstants.html#INTENT_FROM_GCM_REGISTRATION_CALLBACK"><CODE>GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK</CODE></A> intent with an |
| <A HREF="../../../../com/google/android/gcm/GCMConstants.html#EXTRA_UNREGISTERED"><CODE>GCMConstants.EXTRA_UNREGISTERED</CODE></A> extra. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="onDestroy(Context)"><!-- --></A><H3> |
| onDestroy</H3> |
| <PRE> |
| public static void <B>onDestroy</B>(Context context)</PRE> |
| <DL> |
| <DD>Clear internal resources. |
| |
| <p> |
| This method should be called by the main activity's <code>onDestroy()</code> |
| method. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getRegistrationId(Context)"><!-- --></A><H3> |
| getRegistrationId</H3> |
| <PRE> |
| public static java.lang.String <B>getRegistrationId</B>(Context context)</PRE> |
| <DL> |
| <DD>Gets the current registration id for application on GCM service. |
| <p> |
| If result is empty, the registration has failed. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>registration id, or empty string if the registration is not |
| complete.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isRegistered(Context)"><!-- --></A><H3> |
| isRegistered</H3> |
| <PRE> |
| public static boolean <B>isRegistered</B>(Context context)</PRE> |
| <DL> |
| <DD>Checks whether the application was successfully registered on GCM |
| service. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setRegisteredOnServer(Context, boolean)"><!-- --></A><H3> |
| setRegisteredOnServer</H3> |
| <PRE> |
| public static void <B>setRegisteredOnServer</B>(Context context, |
| boolean flag)</PRE> |
| <DL> |
| <DD>Sets whether the device was successfully registered in the server side. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="isRegisteredOnServer(Context)"><!-- --></A><H3> |
| isRegisteredOnServer</H3> |
| <PRE> |
| public static boolean <B>isRegisteredOnServer</B>(Context context)</PRE> |
| <DL> |
| <DD>Checks whether the device was successfully registered in the server side, |
| as set by <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#setRegisteredOnServer(Context, boolean)"><CODE>setRegisteredOnServer(Context, boolean)</CODE></A>. |
| |
| <p>To avoid the scenario where the device sends the registration to the |
| server but the server loses it, this flag has an expiration date, which |
| is <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#DEFAULT_ON_SERVER_LIFESPAN_MS"><CODE>DEFAULT_ON_SERVER_LIFESPAN_MS</CODE></A> by default (but can be changed |
| by <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#setRegisterOnServerLifespan(Context, long)"><CODE>setRegisterOnServerLifespan(Context, long)</CODE></A>). |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getRegisterOnServerLifespan(Context)"><!-- --></A><H3> |
| getRegisterOnServerLifespan</H3> |
| <PRE> |
| public static long <B>getRegisterOnServerLifespan</B>(Context context)</PRE> |
| <DL> |
| <DD>Gets how long (in milliseconds) the <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#isRegistered(Context)"><CODE>isRegistered(Context)</CODE></A> |
| property is valid. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>value set by <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#setRegisteredOnServer(Context, boolean)"><CODE>setRegisteredOnServer(Context, boolean)</CODE></A> or |
| <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#DEFAULT_ON_SERVER_LIFESPAN_MS"><CODE>DEFAULT_ON_SERVER_LIFESPAN_MS</CODE></A> if not set.</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setRegisterOnServerLifespan(Context, long)"><!-- --></A><H3> |
| setRegisterOnServerLifespan</H3> |
| <PRE> |
| public static void <B>setRegisterOnServerLifespan</B>(Context context, |
| long lifespan)</PRE> |
| <DL> |
| <DD>Sets how long (in milliseconds) the <A HREF="../../../../com/google/android/gcm/GCMRegistrar.html#isRegistered(Context)"><CODE>isRegistered(Context)</CODE></A> |
| flag is valid. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/google/android/gcm/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../com/google/android/gcm/GCMConstants.html" title="class in com.google.android.gcm"><B>PREV CLASS</B></A> |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?com/google/android/gcm/GCMRegistrar.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="GCMRegistrar.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| |
| </BODY> |
| </HTML> |