summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/downloads/training/ActivityRecognition.zipbin0 -> 46482 bytes
-rw-r--r--docs/downloads/training/GeofenceDetection.zipbin0 -> 69289 bytes
-rwxr-xr-xdocs/downloads/training/LocationUpdates.zipbin0 -> 49600 bytes
-rw-r--r--docs/html/distribute/distribute_toc.cs3
-rw-r--r--docs/html/distribute/googleplay/about/distribution.jd18
-rw-r--r--docs/html/distribute/googleplay/publish/localizing.jd596
-rw-r--r--docs/html/distribute/googleplay/publish/preparing.jd60
-rw-r--r--docs/html/distribute/googleplay/quality/core.jd2
-rw-r--r--docs/html/google/gcm/ccs.jd297
-rw-r--r--docs/html/google/gcm/demo.jd5
-rw-r--r--docs/html/google/gcm/gcm.jd146
-rw-r--r--docs/html/google/gcm/gs.jd388
-rw-r--r--docs/html/google/gcm/helper.jd182
-rw-r--r--docs/html/google/gcm/index.jd60
-rw-r--r--docs/html/google/gcm/notifications.jd171
-rw-r--r--docs/html/google/google_toc.cs33
-rw-r--r--docs/html/guide/topics/location/index.jd40
-rw-r--r--docs/html/guide/topics/location/strategies.jd51
-rwxr-xr-xdocs/html/guide/topics/resources/localization.jd158
-rw-r--r--docs/html/images/google/gps-location.pngbin35859 -> 41815 bytes
-rw-r--r--docs/html/reference/com/google/android/gcm/server/MulticastResult.Builder.html1230
-rw-r--r--docs/html/reference/com/google/android/gcm/server/Result.Builder.html1275
-rw-r--r--docs/html/reference/com/google/android/gms/common/data/DataBufferIterator.html1320
-rw-r--r--docs/html/reference/com/google/android/gms/common/data/DataBufferRef.html1875
-rw-r--r--docs/html/reference/com/google/android/gms/common/data/DataHolder.Builder.html1412
-rw-r--r--docs/html/reference/com/google/android/gms/common/data/DataHolder.html2606
-rw-r--r--docs/html/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html1674
-rw-r--r--docs/html/reference/com/google/android/gms/common/server/package-summary.html685
-rw-r--r--docs/html/sdk/installing/installing-adt.jd63
-rw-r--r--docs/html/tools/publishing/preparing.jd4
-rw-r--r--docs/html/tools/publishing/versioning.jd2
-rw-r--r--docs/html/training/basics/location/currentlocation.jd163
-rw-r--r--docs/html/training/basics/location/geocoding.jd98
-rw-r--r--docs/html/training/basics/location/index.jd50
-rw-r--r--docs/html/training/basics/location/locationmanager.jd120
-rw-r--r--docs/html/training/basics/supporting-devices/languages.jd4
-rw-r--r--docs/html/training/location/activity-recognition.jd781
-rw-r--r--docs/html/training/location/display-address.jd280
-rw-r--r--docs/html/training/location/geofencing.jd1407
-rw-r--r--docs/html/training/location/index.jd88
-rw-r--r--docs/html/training/location/receive-location-updates.jd590
-rw-r--r--docs/html/training/location/retrieve-current.jd387
-rw-r--r--docs/html/training/training_toc.cs92
-rw-r--r--location/java/android/location/package.html15
44 files changed, 5432 insertions, 12999 deletions
diff --git a/docs/downloads/training/ActivityRecognition.zip b/docs/downloads/training/ActivityRecognition.zip
new file mode 100644
index 0000000..39c04e1
--- /dev/null
+++ b/docs/downloads/training/ActivityRecognition.zip
Binary files differ
diff --git a/docs/downloads/training/GeofenceDetection.zip b/docs/downloads/training/GeofenceDetection.zip
new file mode 100644
index 0000000..bb89136
--- /dev/null
+++ b/docs/downloads/training/GeofenceDetection.zip
Binary files differ
diff --git a/docs/downloads/training/LocationUpdates.zip b/docs/downloads/training/LocationUpdates.zip
new file mode 100755
index 0000000..d3ebc6f
--- /dev/null
+++ b/docs/downloads/training/LocationUpdates.zip
Binary files differ
diff --git a/docs/html/distribute/distribute_toc.cs b/docs/html/distribute/distribute_toc.cs
index 3ea11bf..45ee22c 100644
--- a/docs/html/distribute/distribute_toc.cs
+++ b/docs/html/distribute/distribute_toc.cs
@@ -14,7 +14,8 @@
<ul>
<li><a href="<?cs var:toroot ?>distribute/googleplay/publish/register.html">Get Started</a></li>
<li><a href="<?cs var:toroot ?>distribute/googleplay/publish/console.html">Developer Console</a></li>
- <li><a href="<?cs var:toroot ?>distribute/googleplay/publish/preparing.html">Publishing Checklist</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/publish/localizing.html">Localization Checklist</a></li>
+ <li><a href="<?cs var:toroot ?>distribute/googleplay/publish/preparing.html">Launch Checklist</a></li>
</ul>
</li>
diff --git a/docs/html/distribute/googleplay/about/distribution.jd b/docs/html/distribute/googleplay/about/distribution.jd
index 7d90426..8020110 100644
--- a/docs/html/distribute/googleplay/about/distribution.jd
+++ b/docs/html/distribute/googleplay/about/distribution.jd
@@ -109,6 +109,24 @@ choice.</p>
<p>Google Play offers convenient options for managing how your apps are
delivered to users.</p>
+<h3 id="abc">Alpha and beta testing, staged rollouts</h3>
+
+<p>It's always valuable to get real-world feedback from users, especially before
+launch. Google Play makes it easy to distribute pre-release versions of your app
+to alpha and beta test groups anywhere in the world. You can start with a small
+group of alpha testers, then move to a larger group of beta testers. Once users
+are added, they access your app's store listing and install the app. User
+feedback from alpha and beta testers goes directly to you and is not posted as
+public reviews. </p>
+
+<p>To help you ensure quality and protect your app ratings, you can choose a
+staged rollout when launching an app or an update. With staged rollout, you
+distribute the production version of your app to a percentage of users. You can
+adjust the percentage as you go, starting small and increasing until your app is
+available to all users.</p>
+
+<h3 id="multiple-apk">Multiple APK support</h3>
+
<p>In most cases, it’s easy to create an app that supports all of your targeted
screen sizes and platform versions from a single APK. Distributing a single APK
to all of your users is a highly recommended approach, because it’s the easiest
diff --git a/docs/html/distribute/googleplay/publish/localizing.jd b/docs/html/distribute/googleplay/publish/localizing.jd
new file mode 100644
index 0000000..a7b4073
--- /dev/null
+++ b/docs/html/distribute/googleplay/publish/localizing.jd
@@ -0,0 +1,596 @@
+page.title=Localization Checklist
+page.tags="localize","localization","resources", "formats", "l10n"
+@jd:body
+
+<div id="qv-wrapper"><div id="qv">
+<h2>Checklist</h2>
+<ol>
+<li><a href="#target-languages">1. Identify target languages</a></li>
+<li><a href="#design">2. Design for localization</a></li>
+<li><a href="#strings">3. Manage strings for localization</a></li>
+<li><a href="#translate">4. Translate UI strings</a></li>
+<li><a href="#test">5. Test your localized app</a></li>
+<li><a href="#prelaunch">6. Prepare for international launch</a></li>
+<li><a href="#support">7. Support international users</a></li>
+</ol>
+<h2>See Also</h2>
+<ol>
+<li><a href="{@docRoot}distribute/googleplay/promote/badges.html">Google Play Badge Builder</a></li>
+<li><a href="{@docRoot}distribute/promote/device-art.html">Device Art Generator</a></li>
+<li><a href="#gp-trans">Translations in Google Play</a></li>
+<li><a href="{@docRoot}sdk/installing/installing-adt.html#tmgr">ADT Translation Manager Plugin</a></li>
+</ol>
+</div></div>
+
+<p>Android and Google Play give you a worldwide audience for your app, with an
+addressable user base that's growing very rapidly in countries such as Japan,
+Korea, India, Brazil, Russia, and elsewhere. </p>
+
+<p>To maximize your app's distribution potential and earn high ratings from
+users around the world, we strongly encourage you to localize your app. </p>
+
+<p>Localization involves a variety of tasks throughout your app's development
+cycle, and advance planning is essential. Some of the tasks include
+translating your UI strings and localizing dates and times, layouts, text
+direction, and finally your Google Play store listing. </p>
+
+<p>This document helps you identify key aspects of localization to prepare for
+and the tasks you'll need to perform, to get your app ready for a
+successful worldwide launch on Google Play.</p>
+
+
+<h2 id="target-languages">1. Identify target languages and locales</h2>
+
+<p>A basic but important step in preparing for localization is identifying the
+countries where you will distribute your app and the languages spoken there.
+Google Play lets you distribute your app broadly to hundreds of countries, reaching
+users who speak a variety of languages. </p>
+
+<p>For international users, you can manage your app on three main dimensions:
+country, locale, and language. Of those, language is the key consideration for
+localization, although locale is also significant because of differences in
+formats for dates, times, currencies, and similar information. Users control
+both the language and locale used on their Android devices and in turn those
+affect the display of your app, once installed.</p>
+
+<p>Typically, you would decide which countries to target first, based on overall
+market size and opportunity, app category, competitive landscape, local pricing
+and financial factors, and so on. Then, based on your country targeting, you
+would determine the languages you need to support in your app. </p>
+
+<p>You will need to decide when to localize into some or all of the languages in your targeted countries. In some countries it might make most sense to deliver an app
+in a major regional or international language only, rather than in all locally
+spoken languages. Similarly, based on overall market size, you might decide to
+deliver your app in only a small number of key languages and offer English or
+another language for other countries. You can add more languages in the future
+as your app's userbase grows.</p>
+
+<p>Localizing your app is particularly important in countries where there is a
+large market opportunity and English or another international language is not
+widely used. Once you have identified your target languages, you can focus your
+development, translation, testing, and marketing efforts to these markets.</p>
+
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138294&topic=2365624&ctx=topic">Supported locations for distributing applications</a></strong> on Google Play.
+.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+
+<h2 id="design">2. Design for localization</h2>
+
+<p>After you've determined your target languages for localization, assess what
+you'll need to do to support them in your app and plan the work early. Consider
+the vocabulary expansion, script requirements, character spacing and wrapping
+constraints, left-to-right and right-to-left support, and other potential
+factors in each language.
+
+<h4>Design a single set of flexible layouts</h4>
+
+<p>As you create your layouts, make sure that any UI elements that hold text are
+designed generously. It’s good to allow more space than necessary for your
+language (up to 30% more is normal) to accommodate other languages.</p>
+
+<p>Also, elements should be able to expand horizontally or vertically to
+accommodate variations in the width and height of UI strings or input text. Your
+text strings should not overlap borders or the screen edge in any of your target
+languages.</p>
+
+<p>If you design your UI carefully, you can typically use a single set of
+layouts for all of the languages you support. See <a
+href="{@docRoot}training/basics/fragments/fragment-ui.html">Building a Flexible
+UI</a> for more information.</p>
+
+<h4 id="rtl">Use alternative layouts where needed</h4>
+
+<p>In cases where your UI can't accommodate text in one of your target
+languages, you can create an <a
+href="{@docRoot}guide/topics/resources/providing-resources.
+html#AlternativeResources">alternative layout</a> for that language only.
+Android makes it easy to declare sets of layouts and other resources to load for
+specific languages, locales, screen sizes, and so on, simply by tagging them
+with the appropriate resource qualifiers. </p>
+
+<p>Although you can use alternative layouts to work around isolated issues, they
+can also make your app harder to maintain over time. In general, using a single,
+more flexible layout is preferred. </p>
+
+<h4 id="rtl">Support RTL layouts and text</h4>
+
+<p>If you are distributing to countries where right-to-left (RTL) scripts are used,
+should consider implementing support for RTL layouts and text display and
+editing, to the extent possible. </p>
+
+<p>Android 4.1 introduced limited support for bidirectional text, allowing apps
+to display and edit text in both left-to-right (LTR) and right-to-left (RTL)
+scripts. Android 4.2 added <a
+href="http://android-developers.blogspot.fr/2013/03/native-rtl-support-in-
+android-42.html">full native support for RTL layouts</a>, including layout
+mirroring, so that you can deliver the same great app experience to all of your
+users. </p>
+
+<p>At a minimum, for Android 4.2 users, it's simple to add basic RTL layout
+mirroring, which goes a long way toward meeting the needs of RTL users. </p>
+
+<h4 id="formats">Use system-provided formats for dates, times, numbers, and
+currencies</h4>
+
+<p>Where your app specifies dates, times, numbers, currencies, and other
+entities that can vary by locale, make sure to use the system-provided formats,
+rather than app-specific formats. Keep in mind that not every locale uses the
+same thousands separator, decimal separator, or percent sign. </p>
+
+<p>Android provides a variety of utilities for formatting and converting
+patterns across locales, such as {@link android.text.format.DateUtils DateUtils} and
+{@link java.text.DateFormat DateFormat} for
+dates; {@link java.lang.String#format String.format()} or {@link java.text.DecimalFormat DecimalFormat} for
+numbers and currency; {@link android.telephony.PhoneNumberUtils
+PhoneNumberUtils} for phone numbers; and others.</p>
+
+<p>If you hard-code your formats based on assumptions about the user's locale,
+your app could encounter problems when the user changes to another locale. The
+easiest and most reliable approach is to always use system-provided formats and
+utilities.</p>
+
+<h4 id="default-resources">Include a full set of default resources</h4>
+
+<p>Make sure that your app can run properly regardless of language or locale by
+providing a complete set of default resources. The app's default resources are
+those that are <em>not marked</em> with any language or locale qualifiers, for
+example those stored in <code>res/drawable/</code> and <code>res/values/</code>.
+If your app attempts to load a resource that isn't available in the current
+language or in the default set, the app will crash. </p>
+
+<p>Whatever the default language you are using in your app, make sure that you
+store the associated layouts, drawables, and strings in default resource
+directories, without language or locale qualifiers. </p>
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="http://android-developers.blogspot.fr/2013/03/native-rtl-support-in-android-42.html">Native RTL Support in Android 4.2</a></strong> &mdash; Blog post that explains how to support RTL in your UI.</li>
+<li><strong><a href="{@docRoot}guide/topics/resources/string-resource.html#Plurals">Quantity Strings (Plurals)</a></strong> &mdash; Developer guide describing how to work with string plurals according to rules of grammar in a given locale. </li>
+<li><strong>{@link java.util.Locale Locale}</strong> &mdash; Reference information about how to use locale data determine exactly what CLDR data or version of the Unicode spec a particular Android platform version uses.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+
+<h2 id="managing-strings">3. Manage strings for localization</h2>
+
+<p>It's important to manage your app's UI strings properly, so that you deliver
+a great experience for users and make localization straightforward.</p>
+
+<h4 id="strings">Move all strings into strings.xml</h4>
+
+<p>As you build your app, remember that it's a best practice to keep all of your
+UI strings in a single file that's easy to update and localize. Declare
+<em>all</em> of your strings as resources in a default <code>strings.xml</code>
+file. Do not hard-code any strings into your compiled code&mdash;hard-coded
+strings are much more difficult to extract, translate, and load properly.
+
+<p>If you keep all of your default strings in a <code>strings.xml</code> file,
+you can quickly extract them for translation, and once the translated strings
+are integrated back into your app with appropriate qualifiers, your app can load
+them without any changes to your compiled code.</p>
+
+<p>If you generate images with text, put those strings in <code>strings.xml</code> as well,
+and regenerate the images after translation.</p>
+
+<h4 id="style">Follow Android guidelines for UI strings</h4>
+
+<p>As you design and develop your UI, make sure that you pay close attention to
+<em>how</em> you talk to your user. In general, use a <a
+href="{@docRoot}design/style/writing.html">succinct and compressed style</a>
+that is friendly but brief, and use a consistent style throughout your UI.
+</p>
+
+<p>Make sure that you read and follow the Android Design recommendations for <a
+href="{@docRoot}design/style/writing.html">writing style and word choice</a>.
+Doing so will make your app appear more polished to the user and will help users
+understand your UI more quickly. </p>
+
+<p>Also, always use Android standard terminology wherever possible&mdash;such as
+for UI elements such as "Action Bar," "Options Menu," "System Bar,"
+"Notifications," and so on. Using Android terms correctly and consistently
+makes translation easier and results in a better end-product for users.</p>
+
+<h4 id="context">Provide sufficient context for declared strings</h4>
+
+<p>As you declare strings in your <code>strings.xml</code> file, make sure to describe the
+context in which the string is used. Add comments before each string that may
+need clarification. This information will be invaluable to translators and will
+help you manage your strings more effectively over time.</p>
+
+<p>For example, background information to provide might include:</p>
+
+<ul>
+ <li>What is this string for? When/where is it presented to the user?</li>
+<li>Where is this in the layout? For example, if it’s a button, translations are
+less flexible than if it were a text box. </li>
+</ul>
+
+<p>Here's an example: </p>
+
+<pre>&lt;!-- The action for submitting a form. This text is on a button that can fit 30 chars --&gt;
+&lt;string name="login_submit_button"&gt;Sign in&lt;/string&gt;</pre>
+
+<h4 id="xliff">Mark message parts that should not be translated</h4>
+
+<p>Often strings contain contain text that should not be translated to other
+languages. Common examples might be a piece of code, a placeholder for a value,
+a special symbol, or a name. As you prepare you strings for translation, look
+for and mark text that should remain as-is, without translation, so that
+translators do not change it. </p>
+
+<p>To mark text that should not be translated, use an
+<code>&lt;xliff:g&gt;</code> placeholder tag. Here's an example tag that ensures
+the text “%1$s” will not be changed during translation (otherwise it could break
+the message):</p>
+
+<pre>&lt;string name="countdown"&gt;
+ &lt;xliff:g id="time" example="5 days&gt;%1$s&lt;/xliff:g&gt;until holiday
+&lt;/string&gt;</pre>
+
+<p>When you declare a placeholder tag, always add an <code>id</code> attribute
+that explains what the placeholder is for. If your app will later replace the
+placeholder value, be sure to provide an example attribute to clarify the expected
+usage.</p>
+
+<p>Here are some more examples of placeholder tag usage:</p>
+<pre>&lt;resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"&gt;
+ &lt;!-- Example placeholder for a special unicode symbol --&gt;
+ &lt;string name="star_rating"&gt;Check out our 5
+ &lt;xliff:g id="star"&gt;\u2605&lt;/xliff:g&gt;
+ &lt;/string&gt;
+ &lt;!-- Example placeholder for a for a URL --&gt;
+ &lt;string name="app_homeurl"&gt;
+ Visit us at &lt;xliff:g id="application_homepage"&gt;http://my/app/home.html&lt;/xliff:g&gt;
+ &lt;/string&gt;
+ &lt;!-- Example placeholder for a name --&gt;
+ &lt;string name="prod_name"&gt;
+ Learn more at &lt;xliff:g id="prod_gamegroup"&gt;Game Group&lt;/xliff:g&gt;
+ &lt;/string&gt;
+ &lt;!-- Example placeholder for a literal --&gt;
+ &lt;string name="promo_message"&gt;
+ Please use the ”&lt;xliff:g id="promotion_code"&gt;ABCDEFG&lt;/xliff:g&gt;” to get a discount.
+ &lt;/string&gt;
+ ...
+&lt;/resources&gt;</pre>
+<!--<pre>&lt;string name="contact_info"&gt;
+ You can see our posts at &lt;xliff:g id="social_account_id"&gt;@superApp&lt;/xliff:g&gt;
+&lt;/string&gt;</pre>-->
+
+<table>
+<tr>
+<td><p>Related resources:</p>
+<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}topics/resources/string-resource.html">String Resources</a></strong> &mdash; Developer guide explaining how to use string resources in your UI.</li>
+<li><strong><a href="{@docRoot}design/style/writing.html">Writing Style</a></strong> &mdash; Android Design guidelines for voice and style in your UI.</li>
+<li><strong><a class="external-link" href="http://en.wikipedia.org/wiki/XLIFF">XML Localisation Interchange File Format (XLIFF)</a></strong> &mdash; Background information on XLIFF.</li>
+</ul>
+</td>
+</tr>
+</table>
+
+
+<h2 id="translate">4. Translate UI strings and other resources</h2>
+
+<p>Translating your app's UI strings and resources to your target languages is
+the key phase of localization, and it's the one that requires the most care and
+planning.</p>
+
+<p>In general, it's recommended to work with a professional translator to ensure
+that the work goes smoothly, stays on schedule, and results in a high-quality
+product that will enhance the value of your app. If you are considering machine
+translations as an alternative, keep in mind that automated translations are less
+reliable than high-quality professional translations and may not produce as good an
+experience for your users.</p>
+
+<h4>Prepare for translation</h4>
+
+<p>Getting high-quality translation output depends in part on your input. To get
+ready for translation, make sure that your <code>strings.xml</code> file is well organized,
+well commented, and accurate.</p>
+
+<p>Here are some ways to prepare your strings for translation:</p>
+<ul>
+ <li>Make sure your strings are formatted correctly and consistently.</li>
+ <li>Follow the strings recommendations listed in <a href="#strings">Manage
+strings for localization</a>, above.</li>
+ <li>Clean up the <code>strings.xml</code> file and remove unused strings.</li>
+ <li>Place comments in the file to identify the owner, origin, and the version
+of the file, as well as any special instructions for translators.</li>
+<li>Identify existing translations, if any, and include those in an outgoing
+zip file or other package that you will send to translators.</li>
+<li>Identify drawables or other resources that require translation and include
+them in the outgoing package for translators.</li>
+<p>Additionally, consider translating your app's store listing details &mdash;
+app title and description, release notes, and so on &mdash; as
+well as other international marketing materials.</p>
+<li>Create a terminology list that explains the meaning and usage of key terms
+used in your product, your market, or the underlying technology. Add the list to
+the outgoing package.</li>
+</ul>
+
+<h4 id="send">Send your strings for translation</h4>
+
+<p>Early in the development cycle, contact professional translation vendors for
+your target languages to get an idea of cost, lead time required, turnaround
+time, and so on. Then select a vendor and secure their services, making sure to
+include multiple iterations in the cost as a safeguard. Google Play can help you
+do this &mdash; see <a href="#gp-trans">Purchase professional
+translations</a>, below.</p>
+
+<p>As soon as your app's UI strings and design are stable, work with your
+development team to extract all of the strings and other resources from the app
+and package them together for the translator. If appropriate, you can version
+the outgoing package for later identification. </p>
+
+<p>When the outgoing package is ready, send it to the translator or share it
+with them over a cloud platform such as Google Drive. Keep a record of what you
+sent and when you sent it, to cross-reference against returning translations and
+billing invoices from the translator.</p>
+
+<p>When your translations are complete, take a preliminary look at the
+translations. Check that all files were translated, check for potential encoding
+issues, and make sure that declaration formats are intact. </p>
+
+<p>If everything looks good, carefully move the localized directories and files
+back into your app's resources. Make sure to tag the directories with the
+appropriate language and locale qualifiers so that they'll later be loaded
+properly.</p>
+
+<p>After the translations are merged back into your app, start <a
+href="#testing">testing the localized app</a>.</p>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Join the translation pilot</h2>
+<p>Google Play is offering translation services as part of a pilot
+program. If you're interested, sign up on the APK page in your
+Developer Console.</p>
+
+<p>If you join, also try the <a
+href="{@docRoot}sdk/installing/installing-adt.html#tmgr">
+ADT Translation Manager Plugin</a>, which makes it easy to upload
+your strings to the Developer Console and download translations
+right into your project. </div>
+</div>
+
+<h4 id="gp-trans">Purchase professional translations through the
+Developer Console</h4>
+
+<p>Google Play can help you quickly find and purchase translations of your app.
+In the Developer Console, you can browse a list of third-party vendors who are
+pre-qualified by Google to offer high-quality translation at competitive prices.
+You can upload the strings you want translated, select the languages you want to
+translate into, and select your translation vendor based on time and price.</p>
+
+<p>Once you've purchased translations, you'll receive an email from your vendor.
+Your translations are a direct business agreement between you and your vendor;
+you'll need to work directly with the vendor to manage the translation process and
+deliverables and resolve any support issues. </p>
+
+
+<h2 id="testing">5. Test your localized app</h2>
+
+<p>Once you've received your translated strings and resources and moved them
+back into your app, you need to test the app to make sure that it's ready for
+distribution to your international users. </p>
+
+<p>Manual testing can help you discover localization issues in your layouts and
+strings that can affect user satisfaction and, ultimately, your app's user
+rating. </p>
+
+<h4 id="native">Set up a test environment</h4>
+
+<p>To test your localized app, you'll need to set up an environment consisting
+of multiple devices (or virtual devices) and screen sizes, based on the markets
+and form factors you are targeting. Note that the range of devices in specific
+regions might be different. If possible, match your test devices to the actual
+devices likely to be available to users.</p>
+
+<h4 id="native">Look for common localization issues</h4>
+
+<p>On each test device, set the language or locale in Settings. Install and
+launch the app and then navigate through all of the UI flows, dialogs, and user
+interactions. Enter text in inputs. Some things to look for include:</p>
+
+<ul>
+ <li>Clipped text, or text that overlaps the edge of UI elements or the
+screen</li>
+ <li>Poor line wrapping</li>
+ <li>Incorrect word breaks or punctuation</li>
+ <li>Incorrect alphabetical sorting</li>
+ <li>Incorrect layout direction or text direction</li>
+ <li>Untranslated text &mdash; if your default strings are displayed instead of
+translated strings, then you may have overlooked those strings for translation
+or marked the resources directory with an incorrect language qualifier. </li>
+</ul>
+
+<p>For cases where your strings have expanded in translation and no longer fit
+your layouts, it's recommended to simplify your default text, simplify your
+translated text, or adjust your default layouts. If none of those resolves the
+issue, you can create a custom layout for the language. </p>
+
+<h4 id="default-test">Test for default resources</h4>
+
+<p>After you've tested your app in all of your supported languages and locales,
+make sure to test it again in an <em>unsupported language</em> and locale. This
+will help you make sure that your app includes a full set of default strings and
+resources, so that your app is usable to all users, regardless of their
+preferred language. </p>
+
+<h4 id="native">Review with native-language speakers</h4>
+
+<p>During or after testing, it's recommended that you let native speakers review
+your localized app. One way to do that is through beta testing with regional
+users &mdash; Google Play can help you do this. See <a href="#beta">Plan a beta
+release</a> for more information.</p>
+
+
+<h2 id="prelaunch">Prepare for international launch</h2>
+
+<p>Getting your app translated is a key part of localization, but to help your
+product attract users and gain visibility, you should prepare for launch in your
+target countries and create a broader launch and marketing plan for
+international users. </p>
+
+
+<h4 id="listing">Localize your Google Play listing</h4>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Localize your Google Play listing</h2>
+<p>Highlight what's great about your app to all of your users! Localize your
+listing in the Developer Console: </p>
+<ul>
+ <li>App title and description</li>
+ <li>App screenshots on phones and tablets</li>
+ <li>Promotional graphics and videos.</li>
+</ul>
+</div>
+</div>
+<p>If you want your app to be successful in international markets, it's
+essential to localize your Google Play store listing. You can manage your
+localized listing in the Developer Console.</p>
+
+<p>Well before launch, decide on your app title, description, promotional text,
+marketing names and programs, and other text and images. Send your
+listing text and images for translation early, so that you have them ready when
+beta testing begins. When your translated text is available, you can add it
+through the Developer Console.</p>
+
+<p>Also, since you've made the effort to create a great localized app, let users
+know about it! Take screenshots of your UI in each language, for phones and 7-
+and 10- inch tablets. You can upload screenshots to the Developer Console for
+each language you support. These will be of great value to users browsing your
+app listing in other languages. </p>
+
+<p>It's also essential to create localized versions of your promotional graphics
+and videos. For example, your app's feature graphic might include text that
+should be translated, for maximum effectiveness, or you might want to take a
+different visual approach in one country than you do in another. You can create
+different versions of your promotional graphics for each language and upload
+them to the Developer Console. If you offer a promotional video, you can create
+localized versions of it and then add a link to the correct localized video for
+each language you support.</p>
+<h4 id="beta">Plan a beta release in key countries</h4>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Easy beta testing</h2>
+<p>Google Play now lets you set up groups of alpha and beta testers, anywhere
+around the world. Check out this powerful feature next time you sign in to the
+Developer Console.</p>
+</div>
+</div>
+
+<p>Before launching your app, it's always valuable to get real-world feedback
+from users &mdash; even more so when you are launching an app in a new language,
+country, or region. In those cases, it's highly recommended that you distribute
+a pre-release version of your app to users across your key markets and provide
+an easy means for them to provide feedback and report bugs. </p>
+
+<p>Google Play can help you set up a beta program for your app. After you sign
+in to the Developer Console and upload your APK, you can set up groups of users
+for alpha testing and beta testing the app. You can start with a small group of
+alpha testers, then move to a larger group of beta testers. Once users are
+added, they access your app's store listing and install the app. User feedback
+from alpha and beta testers goes directly to you and is not posted as public
+reviews. </p>
+
+<p>The feedback you receive will help you adjust your UI, translations, and
+store listing to ensure a great experience for users. </p>
+
+<h4 id="beta">Plan for international marketing</h4>
+
+<p>For highest visibility across countries, consider an international marketing
+or advertising campaign. The scope of the campaign might vary based on the
+budget you can support, but in general it's cost-effective and productive to do
+regional or country-specific marketing at launch and after. </p>
+
+<h4 id="badges">Create localized Google Play badges</h4>
+
+<p>If you are preparing international marketing, make sure to include a <a
+href="{@docRoot}distribute/googleplay/promote/badges.html">localized Google Play
+badge</a> to tell users you're on Google Play. You can use the badge generator
+to quickly build localized badges that you can use on web sites or marketing
+materials. High-resolution assets are also available.</p>
+
+<h4 id="deviceart">Create Localized Device Art</h4>
+
+<p>If you feature product shots of your app running on Android devices, make
+sure that those shots look great and reflect the latest in Android devices. To
+help you create high-quality marketing materials, use the drag-and-drop <a
+href="{@docRoot}distribute/promote/device-art.html">Device Art Generator</a> to
+quickly frame your screen shot on a Nexus device. </p>
+
+
+<h2 id="support">Support International Users after Launch</h2>
+
+<p>After you launch your app internationally, you should be prepared to support
+users in a variety of languages and time zones. The extent of your international
+user support depends on your budget, but at a minimum you should watch your
+ratings, reviews, and download stats carefully after launch.
+
+<p>Here are some suggestions: </p>
+
+<ul>
+ <li>Use the app stats in the Developer Console to compare your downloads,
+installs, and uninstalls, and ratings across languages and countries&mdash;If
+your downloads or ratings are not keeping up in specific languages or countries,
+consider options for improving your product or changing your marketing approach.
+</li>
+ <li>Check reviews regularly&mdash;Google Play translates all user reviews for
+you, so you can stay in touch with how international users feel about your app,
+what features they like and what issues are affecting them. By watching reviews,
+you can spot technical issues that may affect many users in a particular
+country, then fix and update your app.</li>
+ <li>Respond to reviews if possible&mdash;It's good to engage with
+international users in their language or a common language if possible. If not,
+you can try using translation tools, although results may not be predictable. If
+your app gets very popular in a language, consider getting support help from
+native-language speakers. </li>
+ <li>Make sure there's a link to any support resources on your web site.
+Consider setting up language-specific user groups, Google+ communities, or other
+support forums.
+</ul>
+
+<p>By following these practices for localizing your app, promoting and marketing
+to international users, and providing ongoing support, you can attract many new
+users to your app and maintain their loyalty.</p>
+
+<p>Make sure to read the <a
+href="{@docRoot}distribute/googleplay/publish/preparing.html">Launch
+Checklist</a> to learn more about how to plan, build, and launch your app on
+Google Play. </p>
diff --git a/docs/html/distribute/googleplay/publish/preparing.jd b/docs/html/distribute/googleplay/publish/preparing.jd
index b4b8c22..0cbc270 100644
--- a/docs/html/distribute/googleplay/publish/preparing.jd
+++ b/docs/html/distribute/googleplay/publish/preparing.jd
@@ -1,4 +1,5 @@
-page.title=Publishing Checklist for Google Play
+page.title=Launch Checklist
+page.tags="publishing","launch","Google Play", "Developer Console"
@jd:body
<div id="qv-wrapper"><div id="qv">
@@ -6,7 +7,7 @@ page.title=Publishing Checklist for Google Play
<ol>
<li><a href="#process">1. Understand the publishing process</a></li>
<li><a href="#policies">2. Understand Google Play policies</a></li>
-<li><a href="#core-app-quality">3. Test for Core App Quality</a></li>
+<li><a href="#core-app-quality">3. Test for core app quality</a></li>
<li><a href="#rating">4. Determine your content rating</a></li>
<li><a href="#countries">5. Determine country distribution</a></li>
<li><a href="#size">6. Confirm the app's overall size</a></li>
@@ -17,10 +18,11 @@ page.title=Publishing Checklist for Google Play
<li><a href="#localize">11. Start localization early</a></li>
<li><a href="#graphics">12. Prepare promotional graphics</a></li>
<li><a href="#apk">13. Build the release-ready APK</a></li>
-<li><a href="#product-page">14. Complete the product details</a></li>
-<li><a href="#badges">15. Use Google Play badges</a></li>
-<li><a href="#final-checks">16. Final checks and publishing</a></li>
-<li><a href="#support">17. Support users after launch</a></li>
+<li><a href="#beta">14. Plan a beta release</a></li>
+<li><a href="#product-page">15. Complete the product details</a></li>
+<li><a href="#badges">16. Use Google Play badges</a></li>
+<li><a href="#final-checks">17. Final checks and publishing</a></li>
+<li><a href="#support">18. Support users after launch</a></li>
</ol>
</div></div>
@@ -171,10 +173,14 @@ your localization needs are, both in your app and in its Google Play listing
details, and start the work of localization well in advance of your
launch target date.</p>
+<p>See <a href="{@docRoot}distribute/googleplay/publish/localizing.html">Localization
+Checklist</a> for key steps and considerations in the localizing process. </p>
+
<table>
<tr>
<td><p>Related resources:</p>
<ul style="margin-top:-.5em;">
+<li><strong><a href="{@docRoot}distribute/googleplay/publish/localizing.html">Localization Checklist</a></strong> &mdash; Overview of key steps and considerations for localizing your Android app.</li>
<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=138294&topic=2365624&ctx=topic">Supported locations for distributing applications</a></strong> on Google Play.
.</li>
</ul>
@@ -363,10 +369,7 @@ launch date.</p>
<li>Localizing the app's graphic assets, screenshots, and videos that accompany your store listing.</li>
</ul>
-<p>To get started localizing your app, work with your development team to extract
-any resource or coded strings for translation. Also identify images, icons, or
-other assets that should be language- or locale-specific. Hand these off to
-a translator.</p>
+<p>See <a href="{@docRoot}distribute/googleplay/publish/localizing.html">Localization Checklist</a> for key steps and considerations in the localizing process. </p>
<p>To localize your store listing, first create and finalize your app title, description,
and promotional text. Collect and send all of these for localization. You can optionally
@@ -391,7 +394,8 @@ when you upload assets and configure your product details.</p>
<tr>
<td><p>Related resources:</p>
<ul style="margin-top:-.5em;">
-<li><strong><a href="{@docRoot}guide/topics/resources/localization.html">Localization</a></strong> &mdash; How to supply localized resources in your app.</li>
+<li><strong><a href="{@docRoot}distribute/googleplay/publish/localizing.html">Localization Checklist</a></strong> &mdash; Overview of key steps and considerations for localizing your Android app.</li>
+<li><strong><a href="{@docRoot}guide/topics/resources/localization.html">Localizing with Resources</a></strong> &mdash; Developer guide to localizing resources in your app.</li>
</ul>
</td>
</tr>
@@ -478,7 +482,33 @@ recent version before publishing. </p>
</tr>
</table>
-<h2 id="product-page">14. Complete the app's product details</h2>
+<h2 id="beta">14. Plan a beta release</h2>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Easy beta testing</h2>
+<p>Google Play now lets you set up groups of alpha and beta testers, anywhere around the world. Check out this powerful feature next time you sign in to the Developer Console.</p>
+</div>
+</div>
+
+<p>Before launching your app, it's always valuable to get real-world feedback
+from users &mdash; even more so when you are launching a new app. It's highly
+recommended that you distribute a pre-release version of your app to users
+across your key markets and provide an easy means for them to provide feedback
+and report bugs. </p>
+
+<p>Google Play can help you set up a beta program for your app. After you sign
+in to the Developer Console and upload your APK, you can set up groups of users
+for alpha testing and beta testing the app. You can start with a small group of
+alpha testers, then move to a larger group of beta testers. Once users are
+added, they access your app's store listing and install the app. User feedback
+from alpha and beta testers goes directly to you and is not posted as public
+reviews. </p>
+
+<p>The feedback you receive will help you adjust your UI, translations, and
+store listing to ensure a great experience for users. </p>
+
+<h2 id="product-page">15. Complete the app's product details</h2>
<p>On Google Play, your app's product information is shown to users on its
product details page, the page that users visit to learn more about your app and
@@ -523,7 +553,7 @@ in the app description, release notes, promotional campaigns, and elsewhere.</p>
</tr>
</table>
-<h2 id="badges">15. Use Google Play badges and links in your promotional
+<h2 id="badges">16. Use Google Play badges and links in your promotional
campaigns</h2>
<p>Google Play badges give you an officially branded way of promoting your app
@@ -552,7 +582,7 @@ and reviews, or any other channel available.</p>
</tr>
</table>
-<h2 id="final-checks">16. Final checks and publishing</h2>
+<h2 id="final-checks">17. Final checks and publishing</h2>
<p>When you think you are ready to publish, sign in to the Developer Console and take a few moments for a few
final checks.</p>
@@ -590,7 +620,7 @@ final checks.</p>
</table>
-<h2 id="support">17. Support users after launch</h2>
+<h2 id="support">18. Support users after launch</h2>
<p>After you publish an app or an app update, it's crucial for you to support
your customers. Prompt and courteous support can provide a better experience for
diff --git a/docs/html/distribute/googleplay/quality/core.jd b/docs/html/distribute/googleplay/quality/core.jd
index c1ef68c..9e23bcc 100644
--- a/docs/html/distribute/googleplay/quality/core.jd
+++ b/docs/html/distribute/googleplay/quality/core.jd
@@ -562,7 +562,7 @@ criteria below.</p>
<tr>
<td><p>Related resources:</p>
<ul style="margin-top:-.5em;">
-<li><strong><a href="https://play.google.com/apps/publish/">Publishing Checklist</a></strong> &mdash; Recommendations on how to prepare your app for publishing, test it, and launch successfully on Google Play.</li>
+<li><strong><a href="https://play.google.com/apps/publish/">Launch Checklist</a></strong> &mdash; Recommendations on how to prepare your app for publishing, test it, and launch successfully on Google Play.</li>
<li><strong><a href="http://play.google.com/about/developer-content-policy.html">Google Play Developer Program Policies</a></strong> — Guidelines for what is acceptable conent in Google Play. Please read and understand the and understand the policies before publishing.</p>
<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&amp;answer=188189">Rating your application content for Google Play</a></strong> — Help Center document describing content ratings levels and how to choose the appropriate one for your app.</li>
<li><strong><a href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&amp;answer=1078870">Graphic Assets for your Application
diff --git a/docs/html/google/gcm/ccs.jd b/docs/html/google/gcm/ccs.jd
new file mode 100644
index 0000000..ffe15c5
--- /dev/null
+++ b/docs/html/google/gcm/ccs.jd
@@ -0,0 +1,297 @@
+page.title=GCM Cloud Connection Server
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Quickview</h2>
+
+<ul>
+<li>Get an introduction to key CCS terms and concepts.</li>
+<li>Learn how to send and receive both upstream and downstream messages in CCS.</li>
+</ul>
+
+
+<h2>In this document</h2>
+
+<ol class="toc">
+ <li><a href="#gcm">CCS vs. GCM HTTP</a> </li>
+ <li><a href="#usage">How to Use CCS</a>
+ <ol>
+ <li><a href="#send_msg">Sending Messages</a></li>
+ <li><a href="#format">Message Format</a></li>
+ <li><a href="#msg_examples">Message Examples</a></li>
+ </ol>
+ </li>
+ <li><a href="#flow">Control Flow</a> </li>
+</ol>
+
+<h2>See Also</h2>
+
+<ol class="toc">
+<li><a href="{@docRoot}google/play-services/gcm/gs.html">Getting Started</a></li>
+<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link" target="_android">CCS and User Notifications Signup Form</a></li>
+</ol>
+
+</div>
+</div>
+
+<p class="note"><strong>Note:</strong> To try out this feature, sign up using <a href="https://services.google.com/fb/forms/gcm/">this form</a>.</p>
+
+<p>The GCM Cloud Connection Server (CCS) allows third party servers to communicate with Android devices by establishing a persistent TCP connection with Google servers using the XMPP protocol. This communication is asynchronous and bidirectional.</p>
+<p>You can continue to use the HTTP request mechanism to send messages to GCM servers, side-by-side with CCS which uses XMPP. Some of the benefits of CCS include:</p>
+<ul>
+ <li>The asynchronous nature of XMPP allows you to send more messages with fewer resources.</li>
+ <li>Communication is bidirectional&mdash;not only can the server send messages to the device, but the device can send messages back to the server.</li>
+<li>You can send messages back using the same connection used for receiving, thereby improving battery life.</li>
+</ul>
+
+<p>The upstream messaging (device-to-cloud) feature of CCS is part of the Google Play services platform. Upstream messaging is available through the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs. To use upstream messaging and the new streamlined registration process, you must <a href="{@docRoot}google/play-services/setup.html">set up</a> the Google Play services SDK.</p>
+
+<h2 id="gcm">CCS vs. GCM HTTP</h2>
+
+<p>CCS messaging differs from GCM HTTP messaging in the following ways:</p>
+<ul>
+ <li>Upstream/Downstream messages
+ <ul>
+ <li>GCM HTTP: Downstream only: cloud-to-device. </li>
+ <li>CCS: Upstream and downstream (device-to-cloud, cloud-to-device). </li>
+ </ul>
+ </li>
+ <li>Asynchronous messaging
+ <ul>
+ <li>GCM HTTP: 3rd-party servers send messages as HTTP POST requests and wait for a response. This mechanism is synchronous and causes the sender to block before sending another message.</li>
+ <li>CCS: 3rd-party servers connect to Google infrastructure using a persistent XMPP connection and send/receive messages to/from all their devices at full line speed. CCS sends acknowledgements or failure notifications (in the form of special ACK and NACK JSON-encoded XMPP messages) asynchronously.</li>
+ </ul>
+ </li>
+
+ <li>JSON
+ <ul>
+ <li>GCM HTTP: JSON messages sent as HTTP POST.</li>
+ <li>CCS: JSON messages encapsulated in XMPP messages.</li>
+ </ul>
+ </li>
+</ul>
+<p>This document describes how to use CCS. For general concepts and information on how to use GCM HTTP, see the <a href="gcm.html">GCM Architectural Overview</a>.</p>
+
+<h2 id="usage">How to Use CCS</h2>
+
+<p>GCM Cloud Connection Server (CCS) is an XMPP endpoint, running on {@code http://gcm.googleapis.com} port 5235.</p>
+
+<p>CCS requires a Transport Layer Security (TLS) connection. That means the XMPP client must initiate a TLS connection.
+For example in smack, you would call {@code setSocketFactory(SSLSocketFactory)}, similar to “old style SSL” XMPP connections and https.</p>
+
+<p>CCS requires a SASL PLAIN authentication mechanism using {@code &lt;your_GCM_Sender_Id&gt;&#64;gcm.googleapis.com} (GCM sender ID) and the API key as the password, where the sender ID and API key are the same as described in <a href="gs.html">Getting Started</a>.</p>
+
+<p> You can use most XMPP libraries to interact with CCS.</p>
+
+<h3 id="send_msg">Sending messages</h3>
+
+<p>The following snippets illustrate how to perform authentication in CCS.</p>
+<h4>Client</h4>
+<pre>&lt;stream:stream to=&quot;gcm.googleapis.com&quot;
+ version=&quot;1.0&quot; xmlns=&quot;jabber:client&quot;
+ xmlns:stream=&quot;http://etherx.jabber.org/streams&quot;/&gt;
+</pre>
+<h4>Server</h4>
+<pre>&lt;str:features xmlns:str=&quot;http://etherx.jabber.org/streams&quot;&gt;
+ &lt;mechanisms xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot;&gt;
+   &lt;mechanism&gt;X-OAUTH2&lt;/mechanism&gt;
+   &lt;mechanism&gt;X-GOOGLE-TOKEN&lt;/mechanism&gt;
+   &lt;mechanism&gt;PLAIN&lt;/mechanism&gt;
+ &lt;/mechanisms&gt;
+&lt;/str:features&gt;
+</pre>
+
+<h4>Client</h4>
+<pre>&lt;auth mechanism=&quot;PLAIN&quot;
+xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot;&gt;MTI2MjAwMzQ3OTMzQHByb2plY3RzLmdjbS5hb
+mRyb2lkLmNvbQAxMjYyMDAzNDc5FzNAcHJvamVjdHMtZ2EtLmFuZHJvaWQuY29tAEFJe
+mFTeUIzcmNaTmtmbnFLZEZiOW1oekNCaVlwT1JEQTJKV1d0dw==&lt;/auth&gt;
+</pre>
+<h4>Server</h4>
+<pre>&lt;success xmlns=&quot;urn:ietf:params:xml:ns:xmpp-sasl&quot;/&gt;</pre>
+
+<h3 id="format">Message Format</h3>
+<p>CCS uses normal XMPP <code>&lt;message&gt;</code> stanzas. The body of the message must be:
+</p>
+<pre>
+&lt;gcm xmlns:google:mobile:data&gt;
+ <em>JSON payload</em>
+&lt;/gcm&gt;
+</pre>
+
+<p>The JSON payload for server-to-device is similar to what the GCM http endpoint uses, with these exceptions:</p>
+<ul>
+ <li>There is no support for multiple recipients.</li>
+ <li>{@code to} is used instead of {@code registration_ids}.</li>
+ <li>CCS adds the field {@code message_id}, which is required. This ID uniquely identifies the message in an XMPP connection. The ACK or NACK from CCS uses the {@code message_id} to identify a message sent from 3rd-party servers to CCS. Therefore, it's important that this {@code message_id} not only be unique, but always present.</li>
+
+ <li>For ACK/NACK messages that are special control messages, you also need to include a {@code message_type} field in the JSON message. For example:
+
+<pre>message_type = ('ack' OR 'nack');</pre>
+ </li>
+</ul>
+<p>For each message a device sends to the server, you need to send an ACK message. You never need to send a NACK message. If you don't send an ACK for a message, CCS will just resend it.
+</p>
+<p>CCS also sends an ACK or NACK for each server-to-device message. If you do not receive either, it means that the TCP connection was closed in the middle of the operation and your server needs to resend the messages.
+</p>
+
+<h3 id="msg_examples">Message Examples</h3>
+
+<p>Here is an XMPP stanza containing the JSON message from a 3rd-party server to CCS:
+
+</p>
+<pre>&lt;message id=&quot;&quot;&gt;
+ &lt;gcm xmlns=&quot;google:mobile:data&quot;&gt;
+ {
+ &quot;to&quot;:&quot;REGISTRATION_ID&quot;, // &quot;to&quot; replaces &quot;registration_ids&quot;
+ &quot;message_id&quot;:&quot;m-1366082849205&quot; // new required field
+ &quot;data&quot;:
+ {
+ &quot;hello&quot;:&quot;world&quot;,
+ }
+ &quot;time_to_live&quot;:&quot;600&quot;,
+ &quot;delay_while_idle&quot;: true/false
+ }
+ &lt;/gcm&gt;
+&lt;/message&gt;
+</pre>
+
+<p>Here is an XMPP stanza containing the ACK/NACK message from CCS to 3rd-party server:
+</p>
+<pre>&lt;message id=&quot;&quot;&gt;
+ &lt;gcm xmlns=&quot;google:mobile:data&quot;&gt;
+ {
+ &quot;from&quot;:&quot;REGID&quot;,
+ &quot;message_id&quot;:&quot;m-1366082849205&quot;
+ &quot;message_type&quot;:&quot;ack&quot;
+ }
+ &lt;/gcm&gt;
+&lt;/message&gt;
+
+&lt;message id=&quot;&quot;&gt;
+ &lt;gcm xmlns=&quot;google:mobile:data&quot;&gt;
+ {
+ &quot;from&quot;:&quot;REGID&quot;,
+ &quot;message_id&quot;:&quot;m-1366082849205&quot;
+ &quot;error&quot;: ERROR_CODE,
+ &quot;message_type&quot;:&quot;nack&quot;
+ }
+ &lt;/gcm&gt;
+&lt;/message&gt;
+</pre>
+
+<h4>Upstream Messages</h4>
+
+<p>Using CCS and the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> API, you can send messages from a user's device to the cloud.</p>
+
+<p>Here is how you send an upstream message using the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> API. For a complete example, see <a href="gs.html#gs_example">Getting Started</a>:</p>
+
+<pre>GoogleCloudMessaging gcm = GoogleCloudMessaging.get(context);
+String GCM_SENDER_ID = "Your-Sender-ID";
+AtomicInteger msgId = new AtomicInteger();
+String id = Integer.toString(msgId.incrementAndGet());
+Bundle data = new Bundle();
+// Bundle data consists of a key-value pair
+data.putString("hello", "world");
+// "time to live" parameter
+int ttl = [0 seconds, 4 weeks]
+
+gcm.send(GCM_SENDER_ID + "&#64;gcm.googleapis.com", id, ttl, data);
+</pre>
+
+<p>This call generates the necessary XMPP stanza for sending the upstream message. The message goes from the app on the device to CCS to the 3rd-party server. The stanza has the following format:</p>
+
+<pre>&lt;message id=&quot;&quot;&gt;
+ &lt;gcm xmlns=&quot;google:mobile:data&quot;&gt;
+ {
+ &quot;category&quot;:&quot;com.example.yourapp&quot;, // to know which app sent it
+ &quot;data&quot;:
+ {
+ &quot;hello&quot;:&quot;world&quot;,
+ },
+ &quot;message_id&quot;:&quot;m-123&quot;,
+ &quot;from&quot;:&quot;REGID&quot;
+ }
+ &lt;/gcm&gt;
+&lt;/message&gt;</pre>
+
+<p>Here is the format of the ACK expected by CCS from 3rd-party servers in response to the above message:</p>
+
+<pre>&lt;message id=&quot;&quot;&gt;
+ &lt;gcm xmlns=&quot;google:mobile:data&quot;&gt;
+ {
+ &quot;to&quot;:&quot;REGID&quot;,
+ &quot;message_id&quot;:&quot;m-123&quot;
+ &quot;message_type&quot;:&quot;ack&quot;
+ }
+ &lt;/gcm&gt;
+&lt;/message&gt;</pre>
+
+<h4 id="python">Python Example</h4>
+<p>This example illustrates how to connect,
+send, and receive GCM messages using XMPP. It shouldn't be used as-is
+on a production deployment.</p>
+
+<pre>
+import sys, json, xmpp
+SERVER = ('gcm.googleapis.com', 5235)
+#USERNAME = '&lt;your_numeric_project_id&gt;'
+#PASSWORD = '&lt;your_gcm_api_key&gt;'
+
+# Unique message id for downstream messages
+sent_message_id = 0
+
+def message_callback(session, message):
+ global sent_message_id
+ gcm = message.getTags('gcm')
+
+ if gcm:
+ gcm_json = gcm[0].getData()
+ msg = json.loads(gcm_json)
+ msg_id = msg['message_id']
+ device_reg_id = msg['from']
+
+ # Ignore non-standard messages (e.g. acks/nacks).
+ if not msg.has_key('message_type'):
+ # Acknowledge the incoming message.
+ send({'to': device_reg_id,
+ 'message_type': 'ack',
+ 'message_id': msg_id})
+
+ # Send a response back to the server.
+ send({'to': device_reg_id,
+ 'message_id' : str(sent_message_id),
+ 'data': {'pong': 1}})
+ sent_message_id = sent_message_id + 1
+
+def send(json_dict):
+ template = (&quot;&lt;message from='{0}' to='gcm@google.com'&gt;&quot;
+ &quot;&lt;gcm xmlns='google:mobile:data'&gt;{1}&lt;/gcm&gt;&lt;/message&gt;&quot;)
+ client.send(xmpp.protocol.Message(
+ node=template.format(client.Bind.bound[0],
+ json.dumps(json_dict))))
+
+client = xmpp.Client(SERVER[0], debug=['socket'])
+client.connect(server=SERVER, secure=1, use_srv=False)
+auth = client.auth(USERNAME, PASSWORD, 'test')
+if not auth:
+ print 'Authentication failed!'
+ sys.exit(1)
+
+client.RegisterHandler('message', message_callback)
+
+while True:
+ client.Process(1)</pre>
+
+<h2 id="flow">Control Flow</h2>
+
+<p>Every message sent by a 3rd-party server to CCS receives either an ACK or a NACK response. A single connection can have at most 1000 messages that were sent without having yet received a response.</p>
+
+<p>To enforce this policy, the app can maintain a counter of sent messages that increments on each send and decrements on each ACK or NACK. If the counter exceeds 1000, the app should stop sending messages until an ACK or NACK is received.</p>
+
+<p>Conversely, when CCS sends messages to a 3rd-party server, it expects ACKs for each message it sends, and it will not send more than 1000 unacknowledged messages.</p>
+
+<p>The ACKs and messages must match on each connection. You can only send an ACK for a message on the connection on which it was received.</p>
+
diff --git a/docs/html/google/gcm/demo.jd b/docs/html/google/gcm/demo.jd
index 1b6b368..6da9e98 100644
--- a/docs/html/google/gcm/demo.jd
+++ b/docs/html/google/gcm/demo.jd
@@ -30,6 +30,8 @@ page.title=GCM Demo Application
</div>
</div>
+<p class="note"><strong>Note:</strong> This tutorial describes how to develop GCM-enabled apps using the helper libraries. This is just one approach. For a more comprehensive discussion of the available APIs and development paths, see <a href="gs.html">Getting Started</a>.
+
<p>The Google Cloud Messaging (GCM) Demo demonstrates how to use the Google Cloud Messaging framework in your Android application. This tutorial walks you through setting up and running the demo.</p>
@@ -106,7 +108,7 @@ Total time: 0 seconds
</li>
</ol>
<p class="note"><strong>Note:</strong> You can get the IP by running <code>ifconfig</code> on Linux or MacOS, or <code>ipconfig</code> on Windows. </p>
-<p><img src="{@docRoot}images/gcm/gcm-demo-homepage.png" class="screenshot" /></p>
+
<p> You server is now ready.</p>
<h3 id="appengine-setup">Using App Engine for Java</h3>
@@ -157,7 +159,6 @@ runserver:
<p class="note"><strong>Note:</strong> You can get the IP by running <code>ifconfig</code> on Linux or MacOS, or <code>ipconfig</code> on Windows.</p>
- <p><img src="{@docRoot}images/gcm/gcm-demo-homepage-appengine.png" class="screenshot" /></p>
</ol>
<p> You server is now ready.</p>
<h2 id="device-setup">Setting Up the Device</h2>
diff --git a/docs/html/google/gcm/gcm.jd b/docs/html/google/gcm/gcm.jd
index ce28fb8..7486d7b 100644
--- a/docs/html/google/gcm/gcm.jd
+++ b/docs/html/google/gcm/gcm.jd
@@ -1,4 +1,4 @@
-page.title=GCM Architectural Overview
+page.title=Google Cloud Messaging for Android
@jd:body
<div id="qv-wrapper">
@@ -20,6 +20,11 @@ page.title=GCM Architectural Overview
<li><a href="#arch">Architectural Overview</a>
<ol>
<li><a href="#lifecycle">Lifecycle Flow</a></li>
+ <ol>
+ <li><a href="#register">Enable GCM</a></li>
+ <li><a href="#push-process">Send a message</a></li>
+ <li><a href="#receiving">Receive a message</a></li>
+ </ol>
<li><a href="#user">What Does the User See?</a></li>
</ol>
</li>
@@ -27,8 +32,8 @@ page.title=GCM Architectural Overview
<ol>
<li><a href="#manifest">Creating the Manifest</a></li>
<li><a href="#registering">Registering for GCM</a></li>
- <li><a href="#unregistering">Unregistering from GCM</a></li>
- <li><a href="#handling_intents">Handling Intents sent by GCM</a>
+
+ <li><a href="#handling_intents">Handling Intents Sent by GCM</a>
<ol>
<li><a href="#handling_reg">Handling Registration Results</a></li>
<li><a href="#received_data">Handling Received Data</a></li>
@@ -46,7 +51,7 @@ page.title=GCM Architectural Overview
</ol>
</li>
</ol>
- <li><a href="#stats">Viewing statistics</a>
+ <li><a href="#stats">Viewing Statistics</a>
</li>
<li><a href="#example">Examples</a></li>
</ol>
@@ -58,20 +63,25 @@ page.title=GCM Architectural Overview
<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
+devices, and upstream messages from the user's device back to the cloud.
+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>GCM introduces GCM Cloud Connection Server (CCS), which you can use
+in tandem with GCM HTTP service/endpoint/APIs.
+CCS uses XMPP, and it offers asynchronous, bidirectional
+messaging. For more information, see
+<a href="ccs.html">GCM Cloud Connection Server</a>.
<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>
-
-
<h2 id="intro">Introduction</h2>
<p>Here are the primary characteristics of Google Cloud
@@ -80,6 +90,7 @@ Messaging (GCM):</p>
<ul>
<li>It allows 3rd-party application servers to send messages to
their Android applications.</li>
+ <li>Using the <a href="ccs.html">GCM Cloud Connection Server</a>, you can receive upstream messages from the user's device.</li>
<li>An Android application on an Android device doesn't need to be running to receive
messages. The system will wake up the Android application via Intent broadcast when the message arrives, as long as the application is set up with the proper
broadcast receiver and permissions.</li>
@@ -170,24 +181,35 @@ which would cause delivery errors.
server that gives the application server authorized access to Google services.
The API key is included in the header of POST requests that send messages.</td>
</tr>
+
+ <tr>
+ <td><strong>Notification Key</strong></td>
+ <td>Part of the user notifications feature, which provides a mapping between a user and instances of an app running on multiple devices owned by the user. The {@code notification_key} is the token that GCM uses to fan out notifications to all devices whose registration IDs are associated with the key. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>.</td>
+ </tr>
+
+<tr>
+ <td><strong>Notification Key Name</strong></td>
+ <td>Part of the user notifications feature. The {@code notification_key_name} is a name or identifier (can be a username for a 3rd-party app) that is unique to a given user. It is used by third parties to group together registration IDs for a single user. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>.</td>
+ </tr>
+
</table>
<h3 id="lifecycle">Lifecycle Flow</h3>
-<p>Here are the primary processes involved in cloud-to-device messaging:</p>
-
<ul>
- <li><a href="#register">Enabling GCM</a>. An Android application running on a
+ <li><a href="#register">Enable GCM</a>. An Android application running on a
mobile device registers to receive messages.</li>
- <li><a href="#push-process">Sending a message</a>. A 3rd-party application
+ <li><a href="notifications.html">User Notifications</a>. A 3rd-party server can optionally group multiple registration IDs
+in a {@code notification_key} to send messages to multiple devices owned by a single user.</li>
+ <li><a href="#push-process">Send a message</a>. A 3rd-party application
server sends messages to the device.</li>
- <li><a href="#receiving">Receiving a message</a>. An Android application
+ <li><a href="#receiving">Receive a message</a>. An Android application
receives a message from a GCM server.</li>
</ul>
<p>These processes are described in more detail below.</p>
-<h4 id="register">Enabling GCM</h4>
+<h4 id="register">Enable GCM</h4>
<p>This is the sequence of events that occurs when an Android application
running on a mobile device registers to receive messages:<span
@@ -195,7 +217,7 @@ class="red-text"></span></p>
<ol>
<li>The first time the Android application needs to use the messaging service, it
-fires off a registration Intent to a GCM server.
+fires off a registration Intent to a GCM server.
<p>This registration Intent
(<code>com.google.android.c2dm.intent.REGISTER</code>) includes the sender ID, and the Android application ID.</p>
<p class="note"><strong>Note:</strong> Because there is no lifecycle method that is called when the application is run for
@@ -204,7 +226,7 @@ the first time, the registration intent should be sent on <code>onCreate()</code
</li>
<li>If the registration is successful, the GCM server broadcasts a <code>com.google.android.c2dm.intent.REGISTRATION</code> intent which gives the Android application a registration
ID.
- <p>The Android application should store this ID for later use (for instance, to check on <code>onCreate()</code> if it is already registered).
+ <p>The Android application should store this ID for later use (for instance, to check on <code>onCreate()</code> if it is already registered).
Note that Google may periodically refresh the registration ID, so you should design your Android application
with the understanding that the <code>com.google.android.c2dm.intent.REGISTRATION</code> intent may be called
multiple times. Your Android application needs to be able to respond
@@ -217,22 +239,26 @@ ID in a database. </li>
<p>The registration ID lasts until the Android application explicitly unregisters
itself, or until Google refreshes the registration ID for your Android application.</p>
-<p class="note"><strong>Note:</strong> When users uninstall an application, it is not automatically unregistered on GCM. It is only unregistered when the GCM server tries to send a message to the device and the device answers that the application is uninstalled or it does not have a broadcast receiver configured to receive <code>com.google.android.c2dm.intent.RECEIVE</code> intents. At that point, your server should mark the device as unregistered (the server will receive a <code><a href="#unreg_device">NotRegistered</a></code> error).
+<p class="note"><strong>Note:</strong> When users uninstall an application, it is not automatically unregistered on GCM. It is only unregistered when the GCM server tries to send a message to the device and the device answers that the application is uninstalled or it does not have a broadcast receiver configured to receive <code>com.google.android.c2dm.intent.RECEIVE</code> intents. At that point, your server should mark the device as unregistered (the server will receive a <code><a href="#unreg_device">NotRegistered</a></code> error).</p>
<p>
-Note that it might take a few minutes for the registration ID to be completely removed from the GCM server. So if the 3rd party server sends a message during this time, it will get a valid message ID, even though the message will not be delivered to the device.</p>
-</p>
+Note that it might take a few minutes for the registration ID to be completely removed from the GCM server. So if the 3rd-party server sends a message during this time, it will get a valid message ID, even though the message will not be delivered to the device.</p>
+
+
-<h4 id="push-process">Sending a Message</h4>
+
+<h4 id="push-process">Send a Message</h4>
<p>For an application server to send a message to an Android application, the following things must be in
place:</p>
<ul>
- <li>The Android application has a registration ID that allows it to receive messages
+ <li>The Android application has stored a target that it can specify as the recipient of a message. This can be one of the following:
+ <ul>
+ <li>A single registration ID (or an array of registration IDs) that allows the app to receive messages
for a particular device.</li>
- <li>The 3rd-party application server has stored the registration ID.</li>
-
-
+ <li>A {@code notification_key} and corresponding {@code notification_key_name}, used to map a single user to multiple registration IDs. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>.</li>
+ </ul>
+ </li>
<li>An API key. This is something that the developer must have already
set up on the application server for the Android application (for more discussion, see
@@ -259,7 +285,7 @@ non-trivial processing, you may want to grab a {@link android.os.PowerManager.Wa
<p> An Android application can unregister GCM if it no longer wants to receive
messages.</p>
-<h4 id="receiving">Receiving a Message</h4>
+<h4 id="receiving">Receive a Message</h4>
<p>This is the sequence of events that occurs when an Android application
installed on a mobile device receives a message:</p>
@@ -313,25 +339,21 @@ simpler approach), see <a href="gs.html">GCM: Getting Started</a>.
<h3 id="manifest">Creating the Manifest</h3>
-<p>Every Android application must have an <code>AndroidManifest.xml</code> file (with
-precisely that name) in its root directory. The manifest presents essential
-information about the Android application to the Android system, information the
-system must have before it can run any of the Android application's code (for more
-discussion of the manifest file, see the <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">Android Developers Guide</a>. To use the GCM feature, the
-manifest must include the following:</p>
+<p>To use the GCM feature, the
+<code>AndroidManifest.xml</code> file must include the following:</p>
<ul>
<li>The <code>com.google.android.c2dm.permission.RECEIVE</code> permission so the Android application can register and receive messages.</li>
- <li>The <code>android.permission.INTERNET</code> permission so the Android application can send the registration ID to the 3rd party server.</li>
+ <li>The <code>android.permission.INTERNET</code> permission so the Android application can send the registration ID to the 3rd-party server.</li>
<li>The <code>android.permission.GET_ACCOUNTS</code> permission as GCM requires a Google account (necessary only if if the device is running a version lower than Android 4.0.4)</li>
- <li>The <code>android.permission.WAKE_LOCK</code> permission so the application can keep the processor from sleeping when a message is received.</li>
+ <li>The <code>android.permission.WAKE_LOCK</code> permission so the application can keep the processor from sleeping when a message is received. Optional&mdash;use only if the app wants to keep the device from sleeping.</li>
<li>An <code>applicationPackage + &quot;.permission.C2D_MESSAGE</code> permission to prevent other Android applications from registering and receiving the Android application's
messages. The permission name must exactly match this pattern&mdash;otherwise the Android application will not receive the messages.</li>
- <li>A receiver for <code>com.google.android.c2dm.intent.RECEIVE</code> and <code>com.google.android.c2dm.intent.REGISTRATION</code>, with the category set
+ <li>A receiver for <code>com.google.android.c2dm.intent.RECEIVE</code> and <code>com.google.android.c2dm.intent.REGISTRATION</code>, with the category set
as <code>applicationPackage</code>. The receiver should require the <code>com.google.android.c2dm.SEND</code> permission, so that only the GCM
Framework can send a message to it. Note that both registration and the receiving
of messages are implemented as <a href="{@docRoot}guide/components/intents-filters.html">Intents</a>.</li>
- <li>An intent service to handle the intents received by the broadcast receiver.</li>
+ <li>An intent service to handle the intents received by the broadcast receiver. Optional.</li>
<li>If the GCM feature is critical to the Android application's function, be sure to
set <code>android:minSdkVersion=&quot;8&quot;</code> in the manifest. This
ensures that the Android application cannot be installed in an environment in which it
@@ -368,8 +390,19 @@ could not run properly. </li>
&lt;/manifest&gt;
</pre>
+
<h3 id="registering">Registering for GCM</h3>
+<div class="sidebox-wrapper">
+<div class="sidebox">
+ <h2>Streamlined Registration</h2>
+ <p>There is now a simpler alternative to registering and unregistering. Simply call the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> method
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html#register">{@code register(senderID...)}</a>.
+This method registers the application for GCM and returns the registration ID. To unregister, call the
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html#unregister">{@code unregister()}</a> method (though you should rarely if ever need to unregister).</p>
+</div>
+</div>
+
<p>An Android application needs to register with GCM servers before it can receive messages. To register, the application sends an Intent
(<code>com.google.android.c2dm.intent.REGISTER</code>), with 2 extra parameters:
</p>
@@ -383,7 +416,7 @@ allow the registration service to extract Android application information. </li>
<p>For example:</p>
-<pre class="prettyprint pretty-java">Intent registrationIntent = new Intent(&quot;com.google.android.c2dm.intent.REGISTER&quot;);
+<pre style="clear:right">Intent registrationIntent = new Intent(&quot;com.google.android.c2dm.intent.REGISTER&quot;);
// sets the app name in the intent
registrationIntent.putExtra(&quot;app&quot;, PendingIntent.getBroadcast(this, 0, new Intent(), 0));
registrationIntent.putExtra(&quot;sender&quot;, senderID);
@@ -415,10 +448,10 @@ startService(unregIntent);
defines a broadcast receiver for the <code>com.google.android.c2dm.intent.REGISTRATION</code> and <code>com.google.android.c2dm.intent.RECEIVE</code> intents.
These <a href="{@docRoot}guide/components/intents-filters.html">intents</a> are sent by GCM to indicate that a device was registered (or unregistered), or to deliver messages, respectively.</p>
-<p>Handling these intents might require I/O operations (such as network calls to the 3rd party server), and
+<p>Handling these intents might require I/O operations (such as network calls to the 3rd-party server), and
such operations should not be done in the receiver's <code>onReceive()</code> method.
-You may be tempted to spawn a new thread directly, but there are no guarantees that the process will run long enough for the thread to finish the work.
-Thus the recommended way to handle the intents is to delegate them to a service, such as an {@link android.app.IntentService}.
+You may be tempted to spawn a new thread directly, but there are no guarantees that the process will run long enough for the thread to finish the work.
+Thus the recommended way to handle the intents is to delegate them to a service, such as an {@link android.app.IntentService}.
For example:</p>
@@ -476,18 +509,18 @@ public class MyIntentService extends IntentService {
<p>When a <code>com.google.android.c2dm.intent.REGISTRATION</code> intent is received, it could potentially contain 3 extras: <code>registration_id</code>, <code>error</code>, and <code>unregistered</code>.
-<p>When a registration succeeds, <code>registration_id</code> contains the registration ID and the other extras are not set.
-The application must ensure that the 3rd-party server receives the registration ID. It may do so by saving the registration ID and sending it to the server.
+<p>When a registration succeeds, <code>registration_id</code> contains the registration ID and the other extras are not set.
+The application must ensure that the 3rd-party server receives the registration ID. It may do so by saving the registration ID and sending it to the server.
If the network is down or there are errors, the application should retry sending the registration ID when the network is up again or the next time it starts.</p>
<p class="note"><strong>Note:</strong> Although the <code>com.google.android.c2dm.intent.REGISTRATION</code> intent is typically received after a request was made by the application,
Google may periodically refresh the registration ID. So the application must be prepared to handle it at any time.</p>
-<p>When an unregistration succeeds, only the <code>unregistered</code> extra is set, and similar to the registration workflow,
-the application must contact the 3rd-party server to remove the registration ID (note that the registration ID is not available in the intent,
+<p>When an unregistration succeeds, only the <code>unregistered</code> extra is set, and similar to the registration workflow,
+the application must contact the 3rd-party server to remove the registration ID (note that the registration ID is not available in the intent,
but the application should have saved the registration ID when it got it).<p>
-<p>If the application request (be it register or unregister) fails, the <code>error</code> will be set with an error code, and the other extras will not be set.
+<p>If the application request (be it register or unregister) fails, the <code>error</code> will be set with an error code, and the other extras will not be set.
Here are the possible error codes:</p>
@@ -536,7 +569,7 @@ phone doesn't currently support GCM.</td>
private void handleRegistration(Intent intent) {
String registrationId = intent.getStringExtra("registration_id");
String error = intent.getStringExtra("error");
- String unregistered = intent.getStringExtra("unregistered");
+ String unregistered = intent.getStringExtra("unregistered");
// registration succeeded
if (registrationId != null) {
// store registration ID on shared preferences
@@ -561,12 +594,14 @@ private void handleRegistration(Intent intent) {
}
}</pre>
+
+
<h4 id="received_data">Handling Received Data</h4>
-<p>The <code>com.google.android.c2dm.intent.RECEIVE</code> intent is used by GCM to
+<p>The <code>com.google.android.c2dm.intent.RECEIVE</code> intent is used by GCM to
deliver the messages sent by the 3rd-party server to the application running in the device.
-If the server included key-pair values in the <code>data</code> parameter, they are available as
-extras in this intent, with the keys being the extra names. GCM also includes an extra called
+If the server included key-pair values in the <code>data</code> parameter, they are available as
+extras in this intent, with the keys being the extra names. GCM also includes an extra called
<code>from</code> which contains the sender ID as an string, and another called <code>collapse_key</code> containing the collapse key (when in use).
<p>Here is an example, again using the <code>MyIntentReceiver</code> class:</p>
@@ -620,6 +655,7 @@ messages.</li>
<p>This section describes how the 3rd-party application server sends messages to one or more mobile devices. Note the following:</p>
<ul>
<li>A 3rd-party application server can either send messages to a single device or to multiple devices. A message sent to multiple devices simultaneously is called a <em>multicast message</em>.</li>
+ <li>To send a single message to multiple devices owned by a single user, you can use a {@code notification_key}, as described in <a href="notifications.html">User Notifications</a>.
<li>You have 2 choices in how you construct requests and responses: plain text or JSON.</li>
<li>However, to send multicast messages, you must use JSON. Plain text will not work.</li>
@@ -660,8 +696,19 @@ Authorization:key=AIzaSyB-1uEai2WiUapxCs2Q0GZYzPu7Udno5aA
</tr>
<tr>
<td><code>registration_ids</code></td>
- <td>A string array with the list of devices (registration IDs) receiving the message. It must contain at least 1 and at most 1000 registration IDs. To send a multicast message, you must use JSON. For sending a single message to a single device, you could use a JSON object with just 1 registration id, or plain text (see below). Required.</td>
+ <td>A string array with the list of devices (registration IDs) receiving the message. It must contain at least 1 and at most 1000 registration IDs. To send a multicast message, you must use JSON. For sending a single message to a single device, you could use a JSON object with just 1 registration id, or plain text (see below). A request must include a recipient&mdash;this can be either a registration ID, an array of registration IDs, or a {@code notification_key}.</td>
+ </tr>
+ <tr>
+ <td><code>notification_key</code></td>
+ <td>A string that maps a single user to multiple registration IDs associated with that user. This
+allows a 3rd-party server to send a single message to multiple app instances (typically on multiple devices) owned by a single user. A 3rd-party server can use {@code notification_key} as the target for a message instead of an individual registration ID (or array of registration IDs). The maximum number of members allowed for a {@code notification_key} is 10. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>. Optional.</td>
+ </tr>
+
+<tr>
+ <td><code>notification_key_name</code></td>
+ <td>A name or identifier (can be a username for a 3rd-party app) that is unique to a given user. It is used by 3rd parties to group together registration IDs for a single user. The <code>notification_key_name</code> should be uniquely named per app in case you have multiple apps for the same project ID. This ensures that notifications only go to the intended target app. For more discussion of this topic, see <a href="notifications.html">User Notifications</a>.</td>
</tr>
+
<tr>
<td><code>collapse_key</code></td>
<td>An arbitrary string (such as &quot;Updates Available&quot;) that is used to collapse a group of like messages
@@ -1043,8 +1090,7 @@ A message was addressed to a registration ID whose package name did not match th
registration_id=32
</pre>
-
-<h3 id="stats">Viewing statistics</h3>
+<h3 id="stats">Viewing Statistics</h3>
<p>To view statistics and any error messages for your GCM applications:</p>
<ol>
diff --git a/docs/html/google/gcm/gs.jd b/docs/html/google/gcm/gs.jd
index e96b204..d938bd6 100644
--- a/docs/html/google/gcm/gs.jd
+++ b/docs/html/google/gcm/gs.jd
@@ -1,16 +1,10 @@
-page.title=GCM: Getting Started
+page.title=Getting Started with GCM
page.tags="cloud","push","messaging"
@jd:body
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-
-<ul>
-<li>Walk through the steps of creating a GCM app.</li>
-</ul>
-
<h2>In this document</h2>
@@ -18,15 +12,37 @@ page.tags="cloud","push","messaging"
<li><a href="#create-proj">Creating a Google API Project</a></li>
<li><a href="#gcm-service">Enabling the GCM Service</a></li>
<li><a href="#access-key">Obtaining an API Key</a></li>
-<li><a href="#libs">Installing the Helper Libraries</a></li>
<li><a href="#android-app">Writing the Android Application</a>
-<li><a href="#server-app">Writing the Server-side Application</a> </li>
+</ol>
+
+<h2>See Also</h2>
+
+<ol class="toc">
+<li><a href="https://code.google.com/apis/console">Google APIs Console page</a></li>
+<li><a href="{@docRoot}google/gcm/helper.html">Using the GCM Helper Libraries</a></li>
+<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link" target="_android">CCS and User Notifications Signup Form</a></li>
</ol>
</div>
</div>
-<p>This document describes how to write an Android application and the server-side logic, using the client and server <a href="{@docRoot}reference/com/google/android/gcm/package-summary.html">helper libraries</a> provided by GCM.</p>
+<p>The sections below guide you through the process of setting up a GCM
+implementation.
+Before you start, make sure to <a href="/google/play-services/setup.html">set up
+the Google Play Services SDK</a>. You need this SDK to use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> methods. Strictly speaking, the only thing you absolutely need this API for is upstream (device-to-cloud) messaging, but it also offers a streamlined registration API that is recommended.</p>
+
+
+<!--the basic steps are:
+
+<ul>
+<li>Creating a Google APIs Project</li>
+<li>Setting up GCM in your apps</li>
+<li>Integrating </li>
+
+<p>Note that a full GCM implementation requires a server-side implementation, in addition to the client implementation in your app. For complete information, make sure to read the <a href="/google/gcm/index.html">Google Cloud Messaging documentation</a>.
+-->
+
+
<h2 id="create-proj">Creating a Google API project</h2>
@@ -58,174 +74,260 @@ page.tags="cloud","push","messaging"
<ol>
<li> In the main Google APIs Console page, select <strong>API Access</strong>. You will see a screen that resembles the following:</li><br />
-<div style="width:408px;margin:1.5em;">
-<div style="width:410px;border:1px solid #DDD;">
+
<img src="{@docRoot}images/gcm/gcm-api-access.png" style="width:400px;padding:4px;margin-bottom:0em;">
-</div>
-</div>
+
<li>Click <strong>Create new Server key</strong>. Either a server key or a browser key should work. The advantage to using a server key is that it allows you to whitelist IP addresses. The following screen appears:</li><br />
-<div style="width:408px;margin:1.5em;">
-<div style="width:410px;border:1px solid #DDD;">
+
<img src="{@docRoot}images/gcm/gcm-config-server-key.png" style="width:400px;padding:4px;margin-bottom:0em;">
-</div>
-</div>
+
<li>Click <strong>Create</strong>:</li><br />
-<div style="width:408px;margin:1.5em;">
-<div style="width:410px;border:1px solid #DDD;">
+
<img src="{@docRoot}images/gcm/gcm-api-key.png" style="width:400px;padding:4px;margin-bottom:0em;">
-</div>
-</div>
+
</ol>
<p> Take note of the <strong>API key</strong> value (<code>YourKeyWillBeShownHere</code>) in this example, as it will be used later on.</p>
<p class="note"><strong>Note:</strong> If you need to rotate the key, click <strong>Generate new key</strong>. A new key will be created while the old one will still be active for up to 24 hours. If you want to get rid of the old key immediately (for example, if you feel it was compromised), click <strong>Delete key</strong>.</p>
-<h2 id="libs">Install the Helper Libraries</h2>
-<p>To perform the steps described in the following sections, you must first install the
-<a href="{@docRoot}reference/com/google/android/gcm/package-summary.html">helper libraries</a>. Note that while using the helper libraries is recommended, it is not required. See the <a href="gcm.html#writing_apps">GCM Architectural Overview</a> for a description of how to write apps without using the helper libraries.
-
-<p>To install the helper libraries, choose
-<strong>Extras &gt; Google Cloud Messaging for Android Library</strong>
-from the SDK Manager. This creates a <code>gcm</code> directory under
-<code><em>YOUR_SDK_ROOT</em>/extras/google/</code> containing these
-subdirectories: <code>gcm-client</code>, <code>gcm-server</code>,
-<code>samples/gcm-demo-client</code>, <code>samples/gcm-demo-server</code>,
-and <code>samples/gcm-demo-appengine</code>.</p>
-
-<p class="note"><strong>Note:</strong> If you don't see <strong>Extras &gt; Google Cloud Messaging for Android Library</strong> in the SDK Manager, make sure you are running version 20 or higher. Be sure to restart the SDK Manager after updating it.</p>
<h2 id="android-app">Writing the Android Application</h2>
<p>This section describes the steps involved in writing an Android application that uses GCM.</p>
-<h4>Step 1: Copy the gcm.jar file into your application classpath</h4>
-<p> To write your Android application, first copy the <code>gcm.jar</code> file from the SDK's <code>gcm-client/dist</code> directory to your application classpath.</p>
-<h4>Step 2: Make the following changes in the application's Android manifest</h4>
-<ol>
- <li>GCM requires Android 2.2 or later, so if your application cannot work without GCM, add the following line, where <em>xx</em> is the latest target SDK version:</li>
-
-<pre class="prettyprint pretty-xml">&lt;uses-sdk android:minSdkVersion=&quot;8&quot; android:targetSdkVersion=&quot;xx&quot;/&gt;</pre>
-
- <li>Declare and use a custom permission so only this application can receive GCM messages:<br>
- </li>
-<pre class="prettyprint pretty-xml">&lt;permission android:name=&quot;my_app_package.permission.C2D_MESSAGE&quot; android:protectionLevel=&quot;signature&quot; /&gt;
-&lt;uses-permission android:name=&quot;my_app_package.permission.C2D_MESSAGE&quot; /&gt; </pre>
-<p> This permission must be called <code>my_app_package.permission.C2D_MESSAGE</code> (where <code>my_app_package</code> is the package name of your app as defined by the manifest tag), otherwise it will not work.</p>
-<p class="note"><strong>Note:</strong> This permission is not required if you are targeting your application to 4.1 or above (i.e., minSdkVersion 16)</p>
+<h4 id="manifest">Step 1: Make the following changes in the application's Android manifest</h4>
+<ul>
+ <li>The <code>com.google.android.c2dm.permission.RECEIVE</code> permission so the Android application can register and receive messages.</li>
+ <li>The <code>android.permission.INTERNET</code> permission so the Android application can send the registration ID to the 3rd party server.</li>
+ <li>The <code>android.permission.GET_ACCOUNTS</code> permission as GCM requires a Google account (necessary only if if the device is running a version lower than Android 4.0.4)</li>
+ <li>The <code>android.permission.WAKE_LOCK</code> permission so the application can keep the processor from sleeping when a message is received. Optional&mdash;use only if the app wants to keep the device from sleeping.</li>
+ <li>An <code>applicationPackage + &quot;.permission.C2D_MESSAGE</code> permission to prevent other Android applications from registering and receiving the Android application's
+messages. The permission name must exactly match this pattern&mdash;otherwise the Android application will not receive the messages.</li>
+ <li>A receiver for <code>com.google.android.c2dm.intent.RECEIVE</code>, with the category set
+as <code>applicationPackage</code>. The receiver should require the <code>com.google.android.c2dm.SEND</code> permission, so that only the GCM
+Framework can send a message to it. Note that the receiving
+of messages is implemented as an <a href="{@docRoot}guide/components/intents-filters.html">intent</a>.</li>
+ <li>An intent service to handle the intents received by the broadcast receiver. Optional.</li>
+ <li>If the GCM feature is critical to the Android application's function, be sure to
+set <code>android:minSdkVersion=&quot;8&quot;</code> in the manifest. This
+ensures that the Android application cannot be installed in an environment in which it
+could not run properly. </li>
+</ul>
- <li>Add the following permissions:</li>
+<p>Here are excerpts from a manifest that supports GCM:</p>
-<pre class="prettyprint pretty-xml">&lt;!-- App receives GCM messages. --&gt;
-&lt;uses-permission android:name=&quot;com.google.android.c2dm.permission.RECEIVE&quot; /&gt;
-&lt;!-- GCM connects to Google Services. --&gt;
-&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
-&lt;!-- GCM requires a Google account. --&gt;
-&lt;uses-permission android:name=&quot;android.permission.GET_ACCOUNTS&quot; /&gt;
-&lt;!-- Keeps the processor from sleeping when a message is received. --&gt;
-&lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;</pre>
+<pre class="prettyprint pretty-xml">
+&lt;manifest package="com.example.gcm" ...&gt;
- <li>Add the following broadcast receiver:</li>
+ &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/&gt;
+ &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
+ &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
+ &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
+ &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
-<pre class="prettyprint pretty-xml">&lt;receiver android:name=&quot;com.google.android.gcm.GCMBroadcastReceiver&quot; android:permission=&quot;com.google.android.c2dm.permission.SEND&quot; &gt;
- &lt;intent-filter&gt;
- &lt;action android:name=&quot;com.google.android.c2dm.intent.RECEIVE&quot; /&gt;
- &lt;action android:name=&quot;com.google.android.c2dm.intent.REGISTRATION&quot; /&gt;
- &lt;category android:name=&quot;my_app_package&quot; /&gt;
- &lt;/intent-filter&gt;
-&lt;/receiver&gt;</pre>
-<p> This broadcast receiver is responsible for handling the 2 intents that can be sent by GCM (<code>com.google.android.c2dm.intent.RECEIVE</code> and <code>com.google.android.c2dm.intent.REGISTRATION</code>) and should be defined in the manifest (rather than programmatically) so that these intents can be received even if the application is not running. By setting the <code>com.google.android.c2dm.permission.SEND</code> permission, you are ensuring that only intents sent by the GCM system framework are sent to the receiver (a regular application cannot issue intents with that permission).</p>
-<p> Notice that <code>android:name</code> in the category tag must be replaced by your application's package name (and the category tag is not required for applications targeted to minSdkVersion 16 and higher).<br>
- </p>
+ &lt;permission android:name="com.example.gcm.permission.C2D_MESSAGE"
+ android:protectionLevel="signature" /&gt;
+ &lt;uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" /&gt;
- <li>Add the following intent service:</li>
+ &lt;application ...&gt;
+ &lt;receiver
+ android:name=".MyBroadcastReceiver"
+ android:permission="com.google.android.c2dm.permission.SEND" &gt;
+ &lt;intent-filter&gt;
+ &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
+ &lt;category android:name="com.example.gcm" /&gt;
+ &lt;/intent-filter&gt;
+ &lt;/receiver&gt;
+ &lt;service android:name=".MyIntentService" /&gt;
+ &lt;/application&gt;
+&lt;/manifest&gt;
+</pre>
- <pre class="prettyprint pretty-xml">&lt;service android:name=&quot;.GCMIntentService&quot; /&gt;</pre>
-</ol>
-<p>This intent service will be called by the <code>GCMBroadcastReceiver</code> (which is provided by the 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>Step 2: Register for GCM</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>
+<p>An Android application running on a mobile device registers to receive messages by calling
+the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> method
+<a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html#register">{@code register(senderID...)}</a>.
+This method registers the application for GCM and returns the registration ID. This streamlined approach replaces the previous
+GCM registration process.</p>
+<h4> Step 3: Write your application</h4>
-<h4>Step 3: Write the my_app_package.GCMIntentService class</h4>
+<p>Finally, write your application. GCM offers a variety of ways to get the job done:</p>
-<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>
- <li><code>onRegistered(Context context, String regId)</code>: Called after a registration intent is received, passes the registration ID assigned by GCM to that device/application pair as parameter. Typically, you should send the <code>regid</code> to your server so it can use it to send messages to this device.</li>
- <li><code>onUnregistered(Context context, String regId)</code>: Called after the device has been unregistered from GCM. Typically, you should send the <code>regid</code> to the server so it unregisters the device.</li>
- <li><code>onMessage(Context context, Intent intent)</code>: Called when your server sends a message to GCM, and GCM delivers it to the device. If the message has a payload, its contents are available as extras in the intent.</li>
- <li><code>onError(Context context, String errorId)</code>: Called when the device tries to register or unregister, but GCM returned an error. Typically, there is nothing to be done other than evaluating the error (returned by errorId) and trying to fix the problem.</li>
- <li> <code>onRecoverableError(Context context, String errorId)</code>: Called when the device tries to register or unregister, but the GCM servers are unavailable. The GCM library will retry the operation using exponential backup, unless this method is overridden and returns false. This method is optional and should be overridden only if you want to display the message to the user or cancel the retry attempts.
- </li>
+ <li>For your messaging server, you can either use the new <a href="ccs.html">GCM Cloud Connection Server</a> (CCS), the older <a href="gcm.html">GCM HTTP server</a>, or both in tandem.</li>
+ <li>To write your client application, you can use any of the following:
+ <ul>
+ <li>The helper libraries, which are described in the <a href="{@docRoot}google/gcm/demo.html">Demo App Tutorial</a> and <a href="{@docRoot}google/gcm/helper.html">Using the GCM Helper Libraries</a>.</li>
+ <li>The approach described in the <a href="{@docRoot}google/gcm/gcm.html#writing_apps">GCM Architectural Overview</a>.</li>
+ <li>Regardless, you must use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs if you are doing upstream (device-to-cloud) messaging. Even if you are not doing upstream messaging, we recommend that you use this API to take advantage of the streamlined registration process&mdash;described above and shown in the following sample.</li>
+</ul>
+</li>
+
</ul>
-<p class="note"><strong>Note:</strong> The methods above run in the intent service's thread and hence are free to make network calls without the risk of blocking the UI thread.</p>
-
-<h4> Step 4: Write your application's main activity</h4>
-Add the following import statement in your application's main activity:
-<pre class="prettyprint pretty-java">import com.google.android.gcm.GCMRegistrar;</pre>
-<p> In the <code>onCreate()</code> method, add the following code:</p>
-<pre class="prettyprint pretty-java">GCMRegistrar.checkDevice(this);
-GCMRegistrar.checkManifest(this);
-final String regId = GCMRegistrar.getRegistrationId(this);
-if (regId.equals("")) {
- GCMRegistrar.register(this, SENDER_ID);
-} else {
- Log.v(TAG, "Already registered");
+<h5 id="gs_example">Example</h5>
+
+<p>Here is a sample application that illustrates how to use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">{@code GoogleCloudMessaging}</a> APIs. In this example, the sender is a <a href="{@docRoot}google/gcm/ccs.html">CCS</a> echo server. The sample consists of a main Activity ({@code DemoActivity}) and a broadcast receiver ({@code GcmBroadcastReceiver}).</p>
+
+<p>An Android application needs to register with GCM servers before it can receive messages. So in its {@code onCreate()} method, {@code DemoActivity} checks to see whether the app is registered with GCM and with the server:</p>
+
+<pre>public class DemoActivity extends Activity {
+
+ public static final String EXTRA_MESSAGE = "message";
+ public static final String PROPERTY_REG_ID = "registration_id";
+ /**
+ * You can use your own project ID instead. This sender is a test CCS
+ * echo server.
+ */
+ String GCM_SENDER_ID = "Your-Sender-ID";
+
+ // Tag for log messages.
+ static final String TAG = "GCMDemo";
+
+ TextView mDisplay;
+ GoogleCloudMessaging gcm;
+ AtomicInteger msgId = new AtomicInteger();
+ SharedPreferences prefs;
+ String regid;
+
+ &#64;Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Make sure the app is registered with GCM and with the server
+ prefs = getSharedPreferences(DemoActivity.class.getSimpleName(),
+ Context.MODE_PRIVATE);
+ setContentView(R.layout.main);
+
+ mDisplay = (TextView) findViewById(R.id.display);
+
+ regid = prefs.getString(PROPERTY_REG_ID, null);
+
+ // If there is no registration ID, the app isn't registered.
+ // Call registerBackground() to register it.
+ if (regid == null) {
+ registerBackground();
+ }
+
+ gcm = GoogleCloudMessaging.getInstance(this);
+ }</pre>
+
+<p>If the app isn't registered, {@code DemoActivity} calls the following {@code registerBackground()} method to register it. Note that because GCM methods are blocking, this has to take place on a background thread. This sample uses {@link android.os.AsyncTask} to accomplish this:</p>
+
+<pre>private void registerBackground() {
+ new AsyncTask<Void, Void, String>() {
+ &#64;Override
+ protected String doInBackground(Void... params) {
+ String msg = "";
+ try {
+ regid = gcm.register(GCM_SENDER_ID);
+ msg = "Device registered, registration id=" + regid;
+
+ // You should send the registration ID to your server over HTTP,
+ // so it can use GCM/HTTP or CCS to send messages to your app.
+
+ // For this demo: we don't need to send it because the device
+ // will send upstream messages to a server that will echo back
+ // the message using the 'from' address in the message.
+
+ // Save the regid for future use - no need to register again.
+ SharedPreferences.Editor editor = prefs.edit();
+ editor.putString(PROPERTY_REG_ID, regid);
+ editor.commit();
+ } catch (IOException ex) {
+ msg = "Error :" + ex.getMessage();
+ }
+ return msg;
+ }
+ // Once registration is done, display the registration status
+ // string in the Activity's UI.
+ &#64;Override
+ protected void onPostExecute(String msg) {
+ mDisplay.append(msg + "\n");
+ }
+ }.execute(null, null, null);
}</pre>
-<p>The <code>checkDevice()</code> method verifies that the device supports GCM and throws an exception if it does not (for instance, if it is an emulator that does not contain the Google APIs). Similarly, the <code>checkManifest()</code> method verifies that the application manifest contains meets all the requirements described in <a href="#android-app">Writing the Android Application</a> (this method is only necessary when you are developing the application; once the application is ready to be published, you can remove it).</p>
-
-<p>Once the sanity checks are done, the device calls <code>GCMRegsistrar.register()</code> to register the device, passing the <code>SENDER_ID</code> you got when you signed up for GCM. But since the <code>GCMRegistrar</code> singleton keeps track of the registration ID upon the arrival of registration intents, you can call <code>GCMRegistrar.getRegistrationId()</code> first to check if the device is already registered.</p>
-<p class="note"><strong>Note:</strong> It is possible that the device was successfully registered to GCM but failed to send the registration ID to your server, in which case you should retry. See <a href="adv.html#reg-state">Advanced Topics</a> for more details on how to handle this scenario.</p>
-
-<h2 id="server-app">Writing the Server-side Application</h2>
-
-<p>To write the server-side application:</p>
-<ol>
- <li> Copy the <code>gcm-server.jar</code> file from the SDK's <code>gcm-server/dist</code> directory to your server classpath.</li>
- <li>Create a servlet (or other server-side mechanism) that can be used by the Android application to send the registration ID received by GCM . The application might also need to send other information&mdash;such as the user's email address or username&mdash;so that the server can associate the registration ID with the user owning the device.</li>
- <li>Similarly, create a servlet used to unregister registration IDs.<br>
- </li>
-<li>When the server needs to send a message to the registration ID, it can use the <code>com.google.android.gcm.server.Sender</code> helper class from the GCM library. For example:</li>
-</ol>
-<pre class="prettyprint pretty-java">import com.google.android.gcm.server.*;
-
-Sender sender = new Sender(myApiKey);
-Message message = new Message.Builder().build();
-MulticastResult result = sender.send(message, devices, 5);</pre>
+<p>When the user clicks the app's <strong>Echo</strong> button, the app generates the necessary XMPP stanza for the message, which it sends to the echo server:</p>
+<pre>public void onClick(final View view) {
+ if (view == findViewById(R.id.send)) {
+ new AsyncTask<Void, Void, String>() {
+ &#64;Override
+ protected String doInBackground(Void... params) {
+ String msg = "";
+ try {
+ Bundle data = new Bundle();
+ // data is a key-value pair.
+ data.putString("hello", "world");
+ String id = Integer.toString(msgId.incrementAndGet());
+ gcm.send(GCM_SENDER_ID + "&#64;gcm.googleapis.com", id, data);
+ msg = "Sending message";
+ } catch (IOException ex) {
+ msg = "Error :" + ex.getMessage();
+ }
+ return msg;
+ }
+
+ &#64;Override
+ protected void onPostExecute(String msg) {
+ // Displays the text "Sending message"
+ mDisplay.append(msg + "\n");
+ }
+ }.execute(null, null, null);
+ }
+}</pre>
-<p> The snippet above does the following:
-<ul>
-<li>Creates a <code>Sender</code> object using your project's API key.</li>
-<li>Creates a message using a given registration ID (the message builder also has methods to set all message parameters such as the collapse key and payload data).</li>
-<li>Sends the message with a maximum of 5 retry attempts (in case the GCM servers are unavailable), and stores the response on result. </li>
-</ul>
-<p>It's now necessary to parse the result and take the proper action in the following cases:</p>
-<ul>
- <li>If the message was created but the result returned a canonical registration ID, it's necessary to replace the current registration ID with the canonical one.</li>
- <li>If the returned error is <code>NotRegistered</code>, it's necessary to remove that registration ID, because the application was uninstalled from the device.</li>
-</ul>
-<p> Here's a code snippet that handles these 2 conditions:</p>
-<pre class="prettyprint pretty-java">
-if (result.getMessageId() != null) {
- String canonicalRegId = result.getCanonicalRegistrationId();
- if (canonicalRegId != null) {
- // same device has more than on registration ID: update database
- }
-} else {
- String error = result.getErrorCodeName();
- if (error.equals(Constants.ERROR_NOT_REGISTERED)) {
- // application has been removed from device - unregister database
- }
+<p>As described above in <a href="#manifest">Step 1</a>, the app includes a broadcast receiver for the <code>com.google.android.c2dm.intent.RECEIVE</code> intent. This is the mechanism GCM uses to deliver messages. When {@code onClick()} calls {@code gcm.send()}, it triggers the broadcast receiver's {@code onReceive()} method, which has the responsibility of handling the GCM message. In this sample the receiver's {@code onReceive()} method calls {@code sendNotification()} to put the message into a notification:</p>
+
+<pre>public class GcmBroadcastReceiver extends BroadcastReceiver {
+ static final String TAG = "GCMDemo";
+ public static final int NOTIFICATION_ID = 1;
+ private NotificationManager mNotificationManager;
+ NotificationCompat.Builder builder;
+ Context ctx;
+
+
+ &#64;Override
+ public void onReceive(Context context, Intent intent) {
+ GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context);
+ ctx = context;
+ String messageType = gcm.getMessageType(intent);
+ if (GoogleCloudMessaging.MESSAGE_TYPE_SEND_ERROR.equals(messageType)) {
+ sendNotification("Send error: " + intent.getExtras().toString());
+ } else if (GoogleCloudMessaging.MESSAGE_TYPE_DELETED.equals(messageType)) {
+ sendNotification("Deleted messages on server: " +
+ intent.getExtras().toString());
+ } else {
+ sendNotification("Received: " + intent.getExtras().toString());
+ }
+ setResultCode(Activity.RESULT_OK);
+ }
+
+ // Put the GCM message into a notification and post it.
+ private void sendNotification(String msg) {
+ mNotificationManager = (NotificationManager)
+ ctx.getSystemService(Context.NOTIFICATION_SERVICE);
+
+ PendingIntent contentIntent = PendingIntent.getActivity(ctx, 0,
+ new Intent(ctx, DemoActivity.class), 0);
+
+ NotificationCompat.Builder mBuilder =
+ new NotificationCompat.Builder(ctx)
+ .setSmallIcon(R.drawable.ic_stat_notification)
+ .setContentTitle("GCM Notification")
+ .setStyle(new NotificationCompat.BigTextStyle()
+ .bigText(msg))
+ .setContentText(msg);
+
+ mBuilder.setContentIntent(contentIntent);
+ mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
+ }
}</pre>
diff --git a/docs/html/google/gcm/helper.jd b/docs/html/google/gcm/helper.jd
new file mode 100644
index 0000000..bde2df0
--- /dev/null
+++ b/docs/html/google/gcm/helper.jd
@@ -0,0 +1,182 @@
+page.title=Using the GCM Helper Libraries
+page.tags="cloud","push","messaging"
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Quickview</h2>
+
+<ul>
+<li>Walk through the steps of creating a GCM app.</li>
+</ul>
+
+
+<h2>In this document</h2>
+
+<ol class="toc">
+<li><a href="#libs">Installing the Helper Libraries</a></li>
+<li><a href="#android-app">Writing the Android Application</a>
+<li><a href="#server-app">Writing the Server-side Application</a> </li>
+</ol>
+
+<h2>See Also</h2>
+
+<ol class="toc">
+<li><a href="{@docRoot}google/play-services/gcm/gs.html">Getting Started with GCM Extensions</a></li>
+<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link" target="_android">CCS and User Notifications Signup Form</a></li>
+</ol>
+
+</div>
+</div>
+
+<p>This document describes how to write an Android application and the server-side logic, using the client and server <a href="{@docRoot}reference/com/google/android/gcm/package-summary.html">helper libraries</a> provided by GCM.</p>
+
+<p>The helper libraries are one option for creating an Android application that uses GCM. You can alternatively use the approach described in the <a href="{@docRoot}google/gcm/gcm.html#writing_apps">GCM Architectural Overview</a>. If you need to perform upstream messaging, you must use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> APIs, and <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> also provides a streamlined registration process.</p>
+
+<p>For information on how to get started creating an Android GCM application and an example of how to use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> APIs, see <a href="{@docRoot}google/gcm/gs.html">Getting Started</a>.</p>
+
+<h2 id="libs">Installing the Helper Libraries</h2>
+<p>To perform the steps described in the following sections, you must first install the
+<a href="{@docRoot}reference/com/google/android/gcm/package-summary.html">helper libraries</a>. Note that while using the helper libraries is recommended, it is not required. See the <a href="gcm.html#writing_apps">GCM Architectural Overview</a> for a description of how to write apps without using the helper libraries.
+
+<p>To install the helper libraries, choose
+<strong>Extras &gt; Google Cloud Messaging for Android Library</strong>
+from the SDK Manager. This creates a <code>gcm</code> directory under
+<code><em>YOUR_SDK_ROOT</em>/extras/google/</code> containing these
+subdirectories: <code>gcm-client</code>, <code>gcm-server</code>,
+<code>samples/gcm-demo-client</code>, <code>samples/gcm-demo-server</code>,
+and <code>samples/gcm-demo-appengine</code>.</p>
+
+<p class="note"><strong>Note:</strong> If you don't see <strong>Extras &gt; Google Cloud Messaging for Android Library</strong> in the SDK Manager, make sure you are running version 20 or higher. Be sure to restart the SDK Manager after updating it.</p>
+
+<h2 id="android-app">Writing the Android Application</h2>
+<p>This section describes the steps involved in writing an Android application that uses GCM.</p>
+<h4>Step 1: Copy the gcm.jar file into your application classpath</h4>
+<p> To write your Android application, first copy the <code>gcm.jar</code> file from the SDK's <code>gcm-client/dist</code> directory to your application classpath.</p>
+<h4>Step 2: Make the following changes in the application's Android manifest</h4>
+<ol>
+ <li>GCM requires Android 2.2 or later, so if your application cannot work without GCM, add the following line, where <em>xx</em> is the latest target SDK version:</li>
+
+<pre class="prettyprint pretty-xml">&lt;uses-sdk android:minSdkVersion=&quot;8&quot; android:targetSdkVersion=&quot;xx&quot;/&gt;</pre>
+
+ <li>Declare and use a custom permission so only this application can receive GCM messages:<br>
+ </li>
+
+<pre class="prettyprint pretty-xml">&lt;permission android:name=&quot;my_app_package.permission.C2D_MESSAGE&quot; android:protectionLevel=&quot;signature&quot; /&gt;
+&lt;uses-permission android:name=&quot;my_app_package.permission.C2D_MESSAGE&quot; /&gt; </pre>
+<p> This permission must be called <code>my_app_package.permission.C2D_MESSAGE</code> (where <code>my_app_package</code> is the package name of your app as defined by the manifest tag), otherwise it will not work.</p>
+<p class="note"><strong>Note:</strong> This permission is not required if you are targeting your application to 4.1 or above (i.e., minSdkVersion 16)</p>
+
+ <li>Add the following permissions:</li>
+
+<pre class="prettyprint pretty-xml">&lt;!-- App receives GCM messages. --&gt;
+&lt;uses-permission android:name=&quot;com.google.android.c2dm.permission.RECEIVE&quot; /&gt;
+&lt;!-- GCM connects to Google Services. --&gt;
+&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
+&lt;!-- GCM requires a Google account. --&gt;
+&lt;uses-permission android:name=&quot;android.permission.GET_ACCOUNTS&quot; /&gt;
+&lt;!-- Keeps the processor from sleeping when a message is received. --&gt;
+&lt;uses-permission android:name=&quot;android.permission.WAKE_LOCK&quot; /&gt;</pre>
+
+ <li>Add the following broadcast receiver:</li>
+
+<pre class="prettyprint pretty-xml">&lt;receiver android:name=&quot;com.google.android.gcm.GCMBroadcastReceiver&quot; android:permission=&quot;com.google.android.c2dm.permission.SEND&quot; &gt;
+ &lt;intent-filter&gt;
+ &lt;action android:name=&quot;com.google.android.c2dm.intent.RECEIVE&quot; /&gt;
+ &lt;action android:name=&quot;com.google.android.c2dm.intent.REGISTRATION&quot; /&gt;
+ &lt;category android:name=&quot;my_app_package&quot; /&gt;
+ &lt;/intent-filter&gt;
+&lt;/receiver&gt;</pre>
+<p> This broadcast receiver is responsible for handling the 2 intents that can be sent by GCM (<code>com.google.android.c2dm.intent.RECEIVE</code> and <code>com.google.android.c2dm.intent.REGISTRATION</code>) and should be defined in the manifest (rather than programmatically) so that these intents can be received even if the application is not running. By setting the <code>com.google.android.c2dm.permission.SEND</code> permission, you are ensuring that only intents sent by the GCM system framework are sent to the receiver (a regular application cannot issue intents with that permission).</p>
+<p> Notice that <code>android:name</code> in the category tag must be replaced by your application's package name (and the category tag is not required for applications targeted to minSdkVersion 16 and higher).<br>
+ </p>
+
+ <li>Add the following intent service:</li>
+
+
+ <pre class="prettyprint pretty-xml">&lt;service android:name=&quot;.GCMIntentService&quot; /&gt;</pre>
+
+</ol>
+<p>This intent service will be called by the <code>GCMBroadcastReceiver</code> (which is provided by the 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>
+
+<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>
+ <li><code>onRegistered(Context context, String regId)</code>: Called after a registration intent is received, passes the registration ID assigned by GCM to that device/application pair as parameter. Typically, you should send the <code>regid</code> to your server so it can use it to send messages to this device.</li>
+ <li><code>onUnregistered(Context context, String regId)</code>: Called after the device has been unregistered from GCM. Typically, you should send the <code>regid</code> to the server so it unregisters the device.</li>
+ <li><code>onMessage(Context context, Intent intent)</code>: Called when your server sends a message to GCM, and GCM delivers it to the device. If the message has a payload, its contents are available as extras in the intent.</li>
+ <li><code>onError(Context context, String errorId)</code>: Called when the device tries to register or unregister, but GCM returned an error. Typically, there is nothing to be done other than evaluating the error (returned by errorId) and trying to fix the problem.</li>
+ <li> <code>onRecoverableError(Context context, String errorId)</code>: Called when the device tries to register or unregister, but the GCM servers are unavailable. The GCM library will retry the operation using exponential backup, unless this method is overridden and returns false. This method is optional and should be overridden only if you want to display the message to the user or cancel the retry attempts.
+ </li>
+</ul>
+
+<p class="note"><strong>Note:</strong> The methods above run in the intent service's thread and hence are free to make network calls without the risk of blocking the UI thread.</p>
+
+<h4> Step 4: Write your application's main activity</h4>
+Add the following import statement in your application's main activity:
+<pre class="prettyprint pretty-java">import com.google.android.gcm.GCMRegistrar;</pre>
+<p> In the <code>onCreate()</code> method, add the following code:</p>
+<pre class="prettyprint pretty-java">GCMRegistrar.checkDevice(this);
+GCMRegistrar.checkManifest(this);
+final String regId = GCMRegistrar.getRegistrationId(this);
+if (regId.equals("")) {
+ GCMRegistrar.register(this, SENDER_ID);
+} else {
+ Log.v(TAG, "Already registered");
+}</pre>
+<p>The <code>checkDevice()</code> method verifies that the device supports GCM and throws an exception if it does not (for instance, if it is an emulator that does not contain the Google APIs). Similarly, the <code>checkManifest()</code> method verifies that the application manifest contains meets all the requirements described in <a href="#android-app">Writing the Android Application</a> (this method is only necessary when you are developing the application; once the application is ready to be published, you can remove it).</p>
+
+<p>Once the sanity checks are done, the device calls <code>GCMRegsistrar.register()</code> to register the device, passing the <code>SENDER_ID</code> you got when you signed up for GCM. But since the <code>GCMRegistrar</code> singleton keeps track of the registration ID upon the arrival of registration intents, you can call <code>GCMRegistrar.getRegistrationId()</code> first to check if the device is already registered.</p>
+<p class="note"><strong>Note:</strong> It is possible that the device was successfully registered to GCM but failed to send the registration ID to your server, in which case you should retry. See <a href="adv.html#reg-state">Advanced Topics</a> for more details on how to handle this scenario.</p>
+
+<h2 id="server-app">Writing the Server-side Application</h2>
+
+<p>To write the server-side application:</p>
+<ol>
+ <li> Copy the <code>gcm-server.jar</code> file from the SDK's <code>gcm-server/dist</code> directory to your server classpath.</li>
+ <li>Create a servlet (or other server-side mechanism) that can be used by the Android application to send the registration ID received by GCM . The application might also need to send other information&mdash;such as the user's email address or username&mdash;so that the server can associate the registration ID with the user owning the device.</li>
+ <li>Similarly, create a servlet used to unregister registration IDs.<br>
+ </li>
+<li>When the server needs to send a message to the registration ID, it can use the <code>com.google.android.gcm.server.Sender</code> helper class from the GCM library. For example:</li>
+</ol>
+
+<pre class="prettyprint pretty-java">import com.google.android.gcm.server.*;
+
+Sender sender = new Sender(myApiKey);
+Message message = new Message.Builder().build();
+MulticastResult result = sender.send(message, devices, 5);</pre>
+
+<p> The snippet above does the following:
+<ul>
+<li>Creates a <code>Sender</code> object using your project's API key.</li>
+<li>Creates a message using a given registration ID (the message builder also has methods to set all message parameters such as the collapse key and payload data).</li>
+<li>Sends the message with a maximum of 5 retry attempts (in case the GCM servers are unavailable), and stores the response on result. </li>
+</ul>
+<p>It's now necessary to parse the result and take the proper action in the following cases:</p>
+<ul>
+ <li>If the message was created but the result returned a canonical registration ID, it's necessary to replace the current registration ID with the canonical one.</li>
+ <li>If the returned error is <code>NotRegistered</code>, it's necessary to remove that registration ID, because the application was uninstalled from the device.</li>
+</ul>
+<p> Here's a code snippet that handles these 2 conditions:</p>
+<pre class="prettyprint pretty-java">
+if (result.getMessageId() != null) {
+ String canonicalRegId = result.getCanonicalRegistrationId();
+ if (canonicalRegId != null) {
+ // same device has more than on registration ID: update database
+ }
+} else {
+ String error = result.getErrorCodeName();
+ if (error.equals(Constants.ERROR_NOT_REGISTERED)) {
+ // application has been removed from device - unregister database
+ }
+}</pre>
diff --git a/docs/html/google/gcm/index.jd b/docs/html/google/gcm/index.jd
index 320bd5b..f9c3ed3 100644
--- a/docs/html/google/gcm/index.jd
+++ b/docs/html/google/gcm/index.jd
@@ -13,37 +13,43 @@ header.hide=1
<h1 itemprop="name" style="margin-bottom:0;">Google Cloud Messaging for Android</h1>
<p itemprop="description">
Google Cloud Messaging for Android (GCM) is a service that allows you to send data
-from your server to your users' Android-powered device. This could be a lightweight
-message telling your app 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).
+from your server to your users' Android-powered device, and also to receive messages from devices on the same connection. The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device. GCM is completely free no matter how big your messaging needs are, and there are no quotas.
</p>
+
</div>
</div>
-<p class="clear:both">
-The GCM service handles all aspects of queueing of messages and delivery to the target Android
-application running on the target device.
-GCM is completely free no matter how big your messaging needs are, and there are no quotas.</p>
-
-<p>To learn more about GCM, you can join the <a
-href="https://groups.google.com/forum/?fromgroups#!forum/android-gcm">android-gcm group</a>
-and read the following documents:</p>
-
-<dl>
- <dt><strong><a href="{@docRoot}google/gcm/gs.html">Getting Started</a></strong></dt>
- <dd>Read this document to learn the basic steps involved in developing Android applications based on GCM.</dd>
- <dt><strong><a href="{@docRoot}google/gcm/gcm.html">Architectural Overview</a></strong></dt>
- <dd>Read this document for a description of the underlying concepts and architecture in GCM.</dd>
- <dt><strong><a href="{@docRoot}google/gcm/demo.html">Demo App Tutorial</a></strong></dt>
- <dd>Read this document to walk through setting up and running the GCM demo app.</dd>
- <dt><strong><a href="{@docRoot}google/gcm/adv.html">Advanced Topics</a></strong></dt>
- <dd>Read this document to get a more in-depth understanding of key GCM features.</dd>
- <dt><a href="{@docRoot}google/gcm/c2dm.html"><strong>Migration</strong></a></dt>
- <dd>Read this document if you are a C2DM developer moving to GCM.</dd>
- <dt><a href="{@docRoot}reference/gcm-packages.html"><strong>API Reference</strong></a></dt>
- <dd>Helper libraries for client and server development.</dd>
-</dl>
+<div class="landing-docs">
+ <div class="col-6 normal-links">
+ <h3 style="clear:left">Key Developer Features</h3>
+ <h4>Send data from your server to users' Android-powered devices</h4>
+ <p>This could be a lightweight
+message telling your app 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). <a href="{@docRoot}google/gcm/gcm.html">GCM Architectural Overview.</a></p>
+
+ <h4>Send "send-to-sync" messages</h4>
+ <p>A send-to-sync (collapsible) message is often a "tickle" that tells a mobile application to sync data from the server. For example, suppose you have an email application. When a user receives new email on the server, the server pings the mobile application with a "New mail" message. This tells the application to sync to the server to pick up the new email.
+ <a href="{@docRoot}google/gcm/adv.html#s2s">Send-to-sync messages</a>.</p>
+ </a>
+
+ <h4>Send messages with payload</h4>
+ <p>Unlike a send-to-sync message, every "message with payload" (non-collapsible message) is delivered. The payload the message contains can be up to 4kb.
+ <a href="{@docRoot}google/gcm/adv.html#payload">Messages with payload</a>.</p>
+ </div>
+
+
+ <div class="col-6 normal-links">
+ <h3 style="clear:left">New Features</h3>
+ <h4>Faster, easier GCM setup</h4>
+ <p>Streamlined registration makes it simple and fast to add GCM support to your Android app. <a href="{@docRoot}google/gcm/gs.html">Learn more &raquo;</a></p>
+ <h4>Upstream messaging over XMPP</h4>
+ <p>GCM's Cloud Connection Service (CCS) lets you communicate with Android devices over a persistent XMPP connection. The primary advantages of CCS are speed, and the ability to receive upstream messages (that is, messages from a device to the cloud). You can use the service in tandem with existing GCM APIs. Use <a href="https://services.google.com/fb/forms/gcm/">this form</a> to sign up for CCS. <a href="{@docRoot}google/gcm/ccs.html">Learn more &raquo;</a></p>
+
+ <h4>Seamless multi-device messaging</h4>
+ <p>Maps a single user to a notification key, which you can then use to send a single message to multiple devices owned by the user. Use <a href="https://services.google.com/fb/forms/gcm/">this form</a> to sign up for User Notifications. <a href="{@docRoot}google/gcm/notifications.html">Learn more &raquo;</a></p>
+ </div>
+</div>
diff --git a/docs/html/google/gcm/notifications.jd b/docs/html/google/gcm/notifications.jd
new file mode 100644
index 0000000..6a4b34a
--- /dev/null
+++ b/docs/html/google/gcm/notifications.jd
@@ -0,0 +1,171 @@
+page.title=User Notifications
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>Quickview</h2>
+
+<ul>
+<li>Learn how to send a single message to multiple devices owned by a single user.</li>
+</ul>
+
+
+<h2>In this document</h2>
+
+<ol class="toc">
+ <li><a href="#what">What are User Notifications?</a> </li>
+ <li><a href="#examples">Examples</a>
+ <ol>
+ <li><a href="#create">Generate a notification key</a></li>
+ <li><a href="#add">Add registration IDs</a></li>
+ <li><a href="#remove">Remove registration IDs</a></li>
+ <li><a href="#upstream">Send upstream messages</a></li>
+ <li><a href="#response">Response formats</a></li>
+ </ol>
+ </li>
+</ol>
+
+<h2>See Also</h2>
+
+<ol class="toc">
+<li><a href="{@docRoot}google/play-services/gcm/gs.html">Getting Started</a></li>
+<li><a href="https://services.google.com/fb/forms/gcm/" class="external-link" target="_android">CCS and User Notifications Signup Form</a></li>
+</ol>
+
+</div>
+</div>
+
+<p class="note"><strong>Note:</strong> To try out this feature, sign up using <a href="https://services.google.com/fb/forms/gcm/">this form</a>.</p>
+
+<p>The upstream messaging (device-to-cloud) feature described in this document is part of the Google Play services platform. Upstream messaging is available through the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> APIs. To use upstream messaging and the new streamlined registration process, you must <a href="{@docRoot}google/play-services/setup.html">set up</a> the Google Play services SDK.</p>
+
+<h2 id="what">What are User Notifications?</h2>
+
+<p>Third party servers can send a single message to multiple instance of an app running on devices owned by a single user. This feature is called <em>user notifications</em>. User notifications make it possible for every app instance that a user owns to reflect the latest messaging state. For example:</p>
+
+ <ul>
+ <li>If a message has been handled on one device, the GCM message on the other devices are dismissed. For example, if a user has handled a calendar notification on one device, the notification will go away on the user's other devices.</li>
+ <li>If a message has not been delivered yet to a device and but it has been handled, the GCM server removes it from the unsent queue for the other devices.</li>
+ <li>Likewise, a device can send messages to the {@code notification_key}, which is the token that GCM uses to fan out notifications to all devices whose registration IDs are associated with the key.</li>
+</ul>
+
+<p>The way this works is that during registration, the 3rd-party server requests a {@code notification_key}. The {@code notification_key} maps a particular user to all of the user's associated registration IDs (a regID represents a particular Android application running on a particular device). Then instead of sending one message to one regID at a time, the 3rd-party server can send a message to to the {@code notification_key}, which then sends the message to all of the user's regIDs.</p>
+
+<p>You can use this feature with either the new <a href="ccs.html">GCM Cloud Connection Server</a> (CCS), or the older <a href="gcm.html">GCM HTTP server</a>.</p>
+
+
+<h3 id="examples">Examples</h3>
+
+<p>The examples in this section show you how to perform generate/add/remove operations, and how to send upstream messages. For generate/add/remove operations, the message body is JSON.</p>
+
+<h4 id="request">Request format</h4>
+<p>To send a message, the application server issues a POST request to <code>https://android.googleapis.com/gcm/notification</code>.</p>
+
+<p>Here is the HTTP request header you should use for all create/add/remove operations:</p>
+
+<pre>content-type: "application/json"
+Header : "project_id": &lt;projectID&gt;
+Header: "Authorization", "key=API_KEY"
+</pre>
+
+<h4 id="create">Generate a notification key</h4>
+
+<p>This example shows how to create a new <code>notification_key</code> for a <code>notification_key_name</code> called <code>appUser-Chris</code>. The {@code notification_key_name} is a name or identifier (can be a username for a 3rd-party app) that is unique to a given user. It is used by third parties to group together registration IDs for a single user. Note that <code>notification_key_name</code> and <code>notification_key</code> are unique to a group of registration IDs. It is also important that <code>notification_key_name</code> be uniquely named per app in case you have multiple apps for the same project ID. This ensures that notifications only go to the intended target app.</p>
+
+
+<p>A create operation returns a token (<code>notification_key</code>). Third parties must save this token (as well as its mapping to the <code>notification_key_name</code>) to use in subsequent operations:</p>
+
+<pre>request:
+{
+ &quot;operation&quot;: &quot;create&quot;,
+ &quot;notification_key_name&quot;: &quot;appUser-Chris&quot;,
+ &quot;registration_ids&quot;: [&quot;4&quot;, &quot;8&quot;, &quot;15&quot;, &quot;16&quot;, &quot;23&quot;, &quot;42&quot;]
+}</pre>
+
+<h4 id="add">Add registration IDs</h4>
+
+<p>This example shows how to add registration IDs for a given notification key. The maximum number of members allowed for a {@code notification_key} is 10.</p>
+
+<p>Note that the <code>notification_key_name</code> is not strictly required for adding/removing regIDs. But including it protects you against accidentally using the incorrect <code>notification_key</code>.</p>
+
+<pre>request:
+{
+ &quot;operation&quot;: &quot;add&quot;,
+ &quot;notification_key_name&quot;: &quot;appUser-Chris&quot;,
+ &quot;notification_key&quot;: &quot;aUniqueKey&quot;
+ &quot;registration_ids&quot;: [&quot;4&quot;, &quot;8&quot;, &quot;15&quot;, &quot;16&quot;, &quot;23&quot;, &quot;42&quot;]
+}</pre>
+
+<h4 id="remove">Remove registration IDs</h4>
+
+<p>This example shows how to remove registration IDs for a given notification key:</p>
+<pre>request:
+{
+ &quot;operation&quot;: &quot;remove&quot;,
+ &quot;notification_key_name&quot;: &quot;appUser-Chris&quot;,
+ &quot;notification_key&quot;: &quot;aUniqueKey&quot;
+ &quot;registration_ids&quot;: [&quot;4&quot;, &quot;8&quot;, &quot;15&quot;, &quot;16&quot;, &quot;23&quot;, &quot;42&quot;]
+}</pre>
+
+<h4 id="upstream">Send upstream messages</h4>
+
+<p>To send an upstream (device-to-cloud) message, you must use the <a href="{@docRoot}reference/com/google/android/gms/gcm/GoogleCloudMessaging.html">GoogleCloudMessaging</a> API. Specifying a {@code notification_key} as the target for an upstream message allows a user on one device to send a message to other devices in the notification group&mdash;for example, to dismiss a notification. Here is an example that shows targeting a {@code notification_key}:</p>
+
+<pre>GoogleCloudMessaging gcm = GoogleCloudMessaging.get(context);
+String to = NOTIFICATION_KEY;
+AtomicInteger msgId = new AtomicInteger();
+String id = Integer.toString(msgId.incrementAndGet());
+Bundle data = new Bundle();
+data.putString("hello", "world");
+
+gcm.send(to, id, data);
+</pre>
+
+<p>This call generates the necessary XMPP stanza for sending the message. The Bundle data consists of a key-value pair.</p>
+
+<p>For a complete example, see <a href="gs.html#gs_example">Getting Started</a>.
+
+<h4 id="response">Response formats</h4>
+
+<p>This section shows examples of the responses that can be returned for notification key operations.</p>
+
+<h5>Response for create/add/remove operations</h5>
+
+<p>When you make a request to create a {@code notification_key} or to add/remove its the wayregIDs, a successful response always returns the <code>notification_key</code>. This is the {@code notification_key} you will use for sending messages:</p>
+
+<pre>HTTP status: 200
+{
+ &quot;notification_key&quot;: &quot;aUniqueKey&quot;, // to be used for sending
+}</pre>
+
+
+<h5>Response for send operations</h5>
+
+<p>For a send operation that has a {@code notification_key} as its target, the possible responses are success, partial success, and failure.</p>
+
+<p>Here is an example of "success"&mdash;the {@code notification_key} has 2 regIDs associated with it, and the message was successfully sent to both of them:</p>
+
+<pre>{
+ "success": 2,
+ "failure": 0
+}</pre>
+
+<p>Here is an example of "partial success"&mdash;the {@code notification_key} has 3 regIDs associated with it. The message was successfully send to 1 of the regIDs, but not to the other 2. The response message lists the regIDs that failed to receive the message:</p>
+
+<pre>{
+ "success":1,
+ "failure":2,
+ "failed_registration_ids":[
+ "regId1",
+ "regId2"
+ ]
+}</pre>
+
+<p>In the case of failure, the response has HTTP code 503 and no JSON. When a message fails to be delivered to one or more of the regIDs associated with a {@code notification_key}, the 3rd-party server should retry.</p>
+
+
+
+
+
+
diff --git a/docs/html/google/google_toc.cs b/docs/html/google/google_toc.cs
index fa9b9c9..a703832 100644
--- a/docs/html/google/google_toc.cs
+++ b/docs/html/google/google_toc.cs
@@ -27,31 +27,18 @@
<li><a href="<?cs var:toroot?>google/play-services/setup.html">
<span class="en">Setup</span></a>
</li>
- <li><a href="<?cs var:toroot?>google/play-services/games.html">
- <span class="en">Games</span></a>
+
+ <li><a href="<?cs var:toroot?>google/play-services/auth.html">
+ <span class="en">Authorization</span></a>
</li>
+
<li><a href="<?cs var:toroot?>google/play-services/plus.html">
<span class="en">Google+</span></a>
</li>
+
<li><a href="<?cs var:toroot?>google/play-services/maps.html">
<span class="en">Google Maps</span></a>
</li>
- <li><a href="<?cs var:toroot?>google/play-services/location.html">
- <span class="en">Location</span></a>
- </li>
- <li><a href="<?cs var:toroot?>google/play-services/gcm.html">
- <span class="en">GCM</span></a>
- </li>
- <li><a href="<?cs var:toroot?>google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="<?cs var:toroot ?>reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
</ul>
</li>
@@ -151,9 +138,19 @@
<li><a href="<?cs var:toroot?>google/gcm/gcm.html">
<span class="en">Architectural Overview</span></a>
</li>
+
+ <li><a href="<?cs var:toroot?>google/gcm/ccs.html">
+ <span class="en">Cloud Connection Server</span></a>
+ </li>
+ <li><a href="<?cs var:toroot?>google/gcm/notifications.html">
+ <span class="en">User Notifications</span></a>
+ </li>
<li><a href="<?cs var:toroot?>google/gcm/demo.html">
<span class="en">Demo App Tutorial</span></a>
</li>
+ <li><a href="<?cs var:toroot?>google/gcm/helper.html">
+ <span class="en">Using the Helper Libraries</span></a>
+ </li>
<li><a href="<?cs var:toroot?>google/gcm/adv.html">
<span class="en">Advanced Topics</span></a>
</li>
diff --git a/docs/html/guide/topics/location/index.jd b/docs/html/guide/topics/location/index.jd
index c4e8829..083842b 100644
--- a/docs/html/guide/topics/location/index.jd
+++ b/docs/html/guide/topics/location/index.jd
@@ -4,33 +4,41 @@ page.title=Location and Maps
<div id="qv-wrapper">
<div id="qv">
- <h2>Quickview</h2>
- <ul>
- <li>Android provides a location framework that your application can use to determine the
-device's location and bearing and register for updates</li>
- <li>A Google Maps external library is available that lets you display and manage Maps data</li>
- </ul>
-
- <h2>In this document</h2>
+<h2>In this document</h2>
<ol>
<li><a href="#location">Location Services</a></li>
<li><a href="#maps">Google Maps Android API</a></li>
</ol>
-
+
</div>
</div>
-
-<p>Location and maps-based apps offer a compelling experience on mobile devices. You
-can build these capabilities into your app using the classes of the {@link
-android.location} package and the Google Maps Android API. The sections below provide
-an introduction to how you can add the features.
+<div class="note">
+<p>
+ <strong>Note:</strong> This is a guide to the <i>Android framework</i> location APIs in the
+ package {@link android.location}. The Google Location Services API, part of Google Play
+ Services, provides a more powerful, high-level framework that automates tasks such as
+ location provider choice and power management. Location Services also provides new
+ features such as activity detection that aren't available in the framework API. Developers who
+ are using the framework API, as well as developers who are just now adding location-awareness
+ to their apps, should strongly consider using the Location Services API.
+</p>
+<p>
+ To learn more about the Location Services API, see
+ <a href="{@docRoot}google/play-services/location.html">Google Location Services for Android</a>.
+</p>
+</div>
+<p>
+ Location and maps-based apps offer a compelling experience on mobile devices. You
+ can build these capabilities into your app using the classes of the {@link
+ android.location} package and the Google Maps Android API. The sections below provide
+ an introduction to how you can add the features.
</p>
<h2 id="location">Location Services</h2>
<p>Android gives your applications access to the location services supported by
the device through classes in the {@code android.location} package. The
-central component of the location framework is the
+central component of the location framework is the
{@link android.location.LocationManager} system service, which provides APIs to
determine location and bearing of the underlying device (if available). </p>
@@ -59,7 +67,7 @@ href="{@docRoot}guide/topics/location/strategies.html">Location Strategies</a> g
<h2 id="maps">Google Maps Android API</h2>
-<p>With the
+<p>With the
<a href="http://developers.google.com/maps/documentation/android/">Google Maps Android API</a>,
you can add maps to your app that are based on Google
Maps data. The API automatically handles access to Google Maps servers, data downloading,
diff --git a/docs/html/guide/topics/location/strategies.jd b/docs/html/guide/topics/location/strategies.jd
index 2f7e6c3..155c86e 100644
--- a/docs/html/guide/topics/location/strategies.jd
+++ b/docs/html/guide/topics/location/strategies.jd
@@ -2,15 +2,8 @@ page.title=Location Strategies
page.tags="geolocation","maps","mapview"
@jd:body
-<div id="qv-wrapper">
-<div id="qv">
-
- <h2>Quickview</h2>
- <ul>
- <li>The Network Location Provider provides good location data without using GPS</li>
- <li>Obtaining user location can consume a lot of battery, so be careful how
-long you listen for updates</li>
- </ul>
+<div id="tb-wrapper">
+<div id="tb">
<h2>In this document</h2>
<ol>
<li><a href="#Challenges">Challenges in Determining User Location</a></li>
@@ -38,7 +31,21 @@ long you listen for updates</li>
</ol>
</div>
</div>
-
+<div class="note">
+<p>
+ <strong>Note:</strong> The strategies described in this guide apply to the platform location
+ API in {@link android.location}. The Google Location Services API, part of Google Play
+ Services, provides a more powerful, high-level framework that automatically handles location
+ providers, user movement, and location accuracy. It also handles
+ location update scheduling based on power consumption parameters you provide. In most cases,
+ you'll get better battery performance, as well as more appropriate accuracy, by using the
+ Location Services API.
+</p>
+<p>
+ To learn more about the Location Services API, see
+ <a href="{@docRoot}google/play-services/location.html">Google Location Services for Android</a>.
+</p>
+</div>
<p>Knowing where the user is allows your application to be smarter and deliver
better information to the user. When developing a location-aware application for Android, you can
utilize GPS and Android's Network Location Provider to acquire the user location. Although
@@ -185,7 +192,7 @@ application is listening for location updates and the events that occur during t
<img src="{@docRoot}images/location/getting-location.png" alt="" />
<p class="img-caption"><strong>Figure 1.</strong> A timeline representing the window in which an
application listens for location updates.</p>
-
+
<p>This model of a window&mdash;during which location updates are received&mdash;frames many of
the decisions you need to make when adding location-based services to your application.</p>
@@ -210,7 +217,7 @@ locationManager.requestLocationUpdates(locationProvider, 0, 0, locationListener)
<h3 id="FastFix">Getting a fast fix with the last known location</h3>
-
+
<p>The time it takes for your location listener to receive the first location fix is often too
long for users wait. Until a more accurate location is provided to your location listener, you
should utilize a cached location by calling {@link
@@ -224,7 +231,7 @@ Location lastKnownLocation = locationManager.getLastKnownLocation(locationProvid
<h3 id="StopListening">Deciding when to stop listening for updates</h3>
-
+
<p>The logic of deciding when new fixes are no longer necessary might range from very simple to
very complex depending on your application. A short gap between when the location is acquired and
when the location is used, improves the accuracy of the estimate. Always beware that listening for a
@@ -251,7 +258,7 @@ varies depending on the use-cases of the application and field testing.</p>
estimate.</li>
<li>Check which provider the new location is from and determine if you trust it more.</li>
</ul>
-
+
<p>An elaborate example of this logic can look something like this:</p>
<pre>
@@ -320,13 +327,13 @@ good performance needs some adjustment. Here are some things you might change to
balance between the two.</p>
<h4>Reduce the size of the window</h4>
-
+
<p>A smaller window in which you listen for location updates means less interaction with GPS and
network location services, thus, preserving battery life. But it also allows for fewer locations
from which to choose a best estimate.</p>
<h4>Set the location providers to return updates less frequently</h4>
-
+
<p>Reducing the rate at which new updates appear during the window can also improve battery
efficiency, but at the cost of accuracy. The value of the trade-off depends on how your
application is used. You can reduce the rate of updates by increasing the parameters in {@link
@@ -334,14 +341,14 @@ android.location.LocationManager#requestLocationUpdates requestLocationUpdates()
interval time and minimum distance change.</p>
<h4>Restrict a set of providers</h4>
-
+
<p>Depending on the environment where your application is used or the desired level of accuracy,
you might choose to use only the Network Location Provider or only GPS, instead of both. Interacting
with only one of the services reduces battery usage at a potential cost of accuracy.</p>
<h2>Common application cases</h2>
-
+
<p>There are many reasons you might want to obtain the user location in your application. Below
are a couple scenarios in which you can use the user location to enrich your application. Each
scenario also describes good practices for when you should start and stop listening for the
@@ -349,7 +356,7 @@ location, in order to get a good reading and help preserve battery life.</p>
<h3>Tagging user-created content with a location</h3>
-
+
<p>You might be creating an application where user-created content is tagged with a location.
Think of users sharing their local experiences, posting a review for a restaurant, or recording some
content that can be augmented with their current location. A model of how this
@@ -358,7 +365,7 @@ interaction might happen, with respect to the location services, is visualized i
<img src="{@docRoot}images/location/content-tagging.png" alt="" />
<p class="img-caption"><strong>Figure 2.</strong> A timeline representing the window in which
the user location is obtained and listening stops when the user consumes the current location.</p>
-
+
<p>This lines up with the previous model of how user location is obtained in code (figure 1). For
best location accuracy, you might choose to start listening for location updates when users begin
creating
@@ -368,7 +375,7 @@ content takes and judge if this duration allows for efficient collection of a lo
<h3>Helping the user decide on where to go</h3>
-
+
<p>You might be creating an application that attempts to provide users with a set
of options about where to go. For example, you're looking to provide a list of nearby restaurants,
stores, and entertainment and the order of recommendations changes depending on the user
@@ -381,7 +388,7 @@ location.</p>
</ul>
<p>This kind of model is visualized in figure 3.</p>
-
+
<img src="{@docRoot}images/location/where-to-go.png" alt="" />
<p class="img-caption"><strong>Figure 3.</strong> A timeline representing the window in which a
dynamic set of data is updated each time the user location updates.</p>
diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd
index 983aef8..480fe65 100755
--- a/docs/html/guide/topics/resources/localization.jd
+++ b/docs/html/guide/topics/resources/localization.jd
@@ -1,53 +1,31 @@
-page.title=Localization
+page.title=Localizing with Resources
parent.title=Application Resources
+page.tags="localizing","localization","resources", "formats", "l10n"
parent.link=index.html
@jd:body
<div id="qv-wrapper">
<div id="qv">
-<h2>Localization quickview</h2>
+<h2>Quickview</h2>
<ul>
- <li>Android lets you create different resource sets for different locales.</li>
- <li>When your application runs, Android will load the resource set
-that match the device's locale.</li>
- <li>If locale-specific resources are not available, Android falls back to
-defaults.</li>
- <li>The emulator has features for testing localized apps. </li>
+ <li>Use resource sets to create a localized app.</li>
+ <li>Android loads the correct resource set for the user's language and locale.</li>
+ <li>If localized resources are not available, Android loads your default resources.</li>
</ul>
<h2>In this document</h2>
<ol>
- <li><a href="#resource-switching">Overview: Resource-Switching in Android</a>
-
-</li>
-<ol><li><a href="#defaults-r-important">Why Default Resources Are Important</a></li></ol>
-<li><a href="#using-framework">Using Resources for Localization</a>
- <ol>
- <li><a href="#creating-defaults">How to Create Default Resources</a></li>
- <li><a href="#creating-alternatives">How to Create Alternative Resources</a></li>
- <li><a href="#resource-precedence">Which Resources Take Precedence?</a></li>
- <li><a href="#referring-to-resources">Referring to Resources in Java</a></li>
- </ol>
-</li>
+ <li><a href="#resource-switching">Overview: Resource-Switching in Android</a></li>
+<li><a href="#using-framework">Using Resources for Localization</a></li>
<li><a href="#strategies">Localization Strategies</a></li>
<li><a href="#testing">Testing Localized Applications</a></li>
- <ol>
- <li><a href="#device">Testing on a Device</a></li>
- <li><a href="#emulator">Testing on an Emulator</a></li>
- <li><a href="#test-for-default">Testing for Default Resources</a></li>
- </ol>
-<li><a href="#checklist">Localization Checklists</a></li>
- <ol>
- <li><a href="#planning-checklist">Planning and Design Checklist</a></li>
- <li><a href="#content-checklist">Content Checklist</a></li>
- <li><a href="#testing-checklist">Testing and Publishing Checklist</a></li>
- </ol>
</ol>
<h2>See also</h2>
<ol>
+ <li><a href="{@docRoot}distribute/googleplay/publish/localizing.html">Localization Checklist</a></li>
<li><a href="{@docRoot}guide/topics/resources/providing-resources.html">Providing Resources</a></li>
<li><a href="{@docRoot}guide/topics/ui/declaring-layout.html">Layouts</a></li>
<li><a href="{@docRoot}reference/android/app/Activity.html#ActivityLifecycle">Activity Lifecycle</a></li>
@@ -500,120 +478,6 @@ the new locale. </p>
portrait orientation and see if the application will run.
-<h2 id="checklist">Localization Checklists</h2>
+<h2 id="checklist">Localization Checklist</h2>
-<p>These checklists summarize the process of localizing an Android application.
-Not everything on these lists will apply to every application.</p>
-
-<h3 id="planning-checklist">Planning and Design Checklist</h3>
-
-<table width="100%" border="0" cellpadding="5" cellspacing="0">
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Choose a localization strategy. Which countries and which languages will
-your application support? What is your application's default country and
-language? How will your application behave when it does not have specific
-resources available for a given locale?</td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td><p>Identify everything in your application that will need to be
-localized: </p>
- <ul>
- <li>Consider specific details of your application &#8212; text, images,
-sounds, music, numbers, money, dates and times. You might not need to localize
-everything. For example, you don't need to localize text that the user never
-sees, or images that are culturally neutral, or icons that convey the same
-meaning in every locale. </li>
- <li>Consider broad themes. For example, if you hope to sell your
-application in two very culturally different markets, you might want to design
-your UI and present your application in an entirely different way for each
-locale.</li>
- </ul></td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td><p>Design your Java code to externalize resources wherever possible:</p>
- <ul>
- <li>Use <code>R.string</code> and <code>strings.xml</code> files instead
-of hard-coded strings or string constants. </li>
- <li>Use <code>R.drawable</code> and <code>R.layout</code> instead of
-hard-coded drawables or layouts. </li>
- </ul></td>
- </tr>
-</table>
-<h3 id="content-checklist">Content Checklist</h3>
-<table border="0" cellspacing="0" cellpadding="5" width="100%">
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Create a full set of default resources in <code>res/values/</code> and
-other <code>res/</code> folders, as described in <a
-href="#creating-defaults">Creating Default Resources</a>.</td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Obtain reliable translations of the static text, including menu text,
-button names, error messages, and help text. Place the translated strings in
-<code>res/values-<em>&lt;qualifiers&gt;</em>/strings.xml</code> files. </td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Make sure that your application correctly formats dynamic text (for
-example numbers and dates) for each supported locale. Make sure that your
-application handles word breaks, punctuation, and alphabetical sorting correctly
-for each supported language.</td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>If necessary, create locale-specific versions of your graphics and
-layout, and place them in <code>res/drawable-<em>&lt;qualifiers&gt;</em>/</code> and
-<code>res/layout-<em>&lt;qualifiers&gt;</em>/</code> folders.</td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Create any other localized content that your application requires; for
-example, create recordings of sound files for each language, as needed.</td>
- </tr>
-</table>
-<h3 id="testing-checklist">Testing and Publishing Checklist</h3>
- <table border="0" cellspacing="0" cellpadding="5" width="100%">
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Test your application for each supported locale. If possible, have a
-person who is native to each locale test your application and give you
-feedback.</td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Test the default resources by loading a locale that is not available on
- the device or emulator. For instructions, see <a href="#test-for-default">
- Testing for Default Resources</a>. </td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Test the localized strings in both landscape and portrait display modes.</td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Sign your application and create your final build or builds.</td>
- </tr>
- <tr>
- <td valign="top" align="center"><img src="../../../images/resources/arrow.png" alt="arrow" width="26"
-border="0"></td>
- <td>Upload your .apk file or files to Google Play, selecting the appropriate
-languages as
- you upload.</td>
- </tr>
-</table> \ No newline at end of file
+<p>For an overview of the process of localizing an Android application, see the <a href="{@docRoot}distribute/googleplay/publish/localization.html">Localization Checklist</a>.</p>
diff --git a/docs/html/images/google/gps-location.png b/docs/html/images/google/gps-location.png
index c9acda1..573779b 100644
--- a/docs/html/images/google/gps-location.png
+++ b/docs/html/images/google/gps-location.png
Binary files differ
diff --git a/docs/html/reference/com/google/android/gcm/server/MulticastResult.Builder.html b/docs/html/reference/com/google/android/gcm/server/MulticastResult.Builder.html
deleted file mode 100644
index 0768237..0000000
--- a/docs/html/reference/com/google/android/gcm/server/MulticastResult.Builder.html
+++ /dev/null
@@ -1,1230 +0,0 @@
-<!DOCTYPE html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
-<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-<title>MulticastResult.Builder | Android Developers</title>
-
-<!-- STYLESHEETS -->
-<link rel="stylesheet"
-href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
-<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
-
-
-
-<!-- JAVASCRIPT -->
-<script src="//www.google.com/jsapi" type="text/javascript"></script>
-<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
-<script type="text/javascript">
- var toRoot = "/";
-
- var devsite = false;
-
-</script>
-<script src="/assets/js/docs.js" type="text/javascript"></script>
-
-<script src="/gms_navtree_data.js" type="text/javascript"></script>
-<script src="/gcm_navtree_data.js" type="text/javascript"></script>
-
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-5831155-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body class="gc-documentation google
- develop" itemscope itemtype="http://schema.org/Article">
- <div id="doc-api-level" class="" style="display:none"></div>
- <a name="top"></a>
-
- <!-- Header -->
- <div id="header">
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="/index.html">
- <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="/design/index.html"
- zh-TW-lang="設計"
- zh-CN-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="/develop/index.html"
- zh-TW-lang="開發"
- zh-CN-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="/distribute/index.html"
- zh-TW-lang="發佈"
- zh-CN-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
-
- <!-- New Search -->
- <div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="/about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
-
-
-
-
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-CN">中文 (中国)</option>
- <option value="zh-TW">中文 (台灣)</option>
- </select>
- </div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
-
-
-
-
- <br class="clearfix" />
- </div>
- <div class="bottom"></div>
- </div>
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
-onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
-onkeydown="return search_changed(event, true, '/')"
-onkeyup="return search_changed(event, false, '/')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div>
- </div>
- <div id="search_filtered_wrapper">
- <div id="search_filtered_div" class="no-display">
- <ul id="search_filtered">
- </ul>
- </div>
- </div>
-
- </div>
- <!-- /New Search>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-9">
- <ul>
- <li class="design">
- <ul>
- <li><a href="/design/index.html">Get Started</a></li>
- <li><a href="/design/style/index.html">Style</a></li>
- <li><a href="/design/patterns/index.html">Patterns</a></li>
- <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="/design/downloads/index.html">Downloads</a></li>
- <li><a href="/design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
- </li>
- <li><a href="/google/index.html">Google Services</a>
- </li>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="/distribute/index.html">Google Play</a></li>
- <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
- <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
- <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
- <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
- <li><a href="/distribute/open.html">Open Distribution</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <!-- /Expanded quicknav -->
- </div>
- </div>
- <!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-
-
-
-
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 develop" style="width:100%">
- <li class="training"><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="/google/index.html"
- >Google Services</a>
- </li>
- </ul>
- </div>
-
- </div>
- <!-- /Sendondary x-nav -->
-
-
-
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
-
-
-
-<ul id="nav">
- <li class="nav-section">
- <div class="nav-section-header empty"><a href="/google/index.html">
- <span class="en">Overview</span>
- </a></div>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play-services/index.html">
- <span class="en">Google Play Services</span></a>
- </div>
- <ul>
- <li><a href="/google/play-services/setup.html">
- <span class="en">Setup</span></a>
- </li>
-
- <li><a href="/google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
-
- <li><a href="/google/play-services/plus.html">
- <span class="en">Google+</span></a>
- </li>
-
- <li><a href="/google/play-services/maps.html">
- <span class="en">Google Maps</span></a>
- </li>
-
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
-
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/billing/index.html">
- <span class="en">Google Play In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/billing/billing_overview.html">
- <span class="en">Overview</span></a>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
- <span class="en">Version 3 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
- <span class="en">Version 2 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/v2/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/v2/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a></li>
- <li><a href="/google/play/billing/v2/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li><a href="/google/play/billing/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a>
- </li>
- <li><a href="/google/play/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="/google/play/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/versions.html">
- <span class="en">Version Notes</span></a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/dist.html">
- <span class="en">Google Play Distribution</span></a>
- </div>
- <ul>
- <li><a href="/google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
-
- <li><a href="/google/play/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="/google/play/expansion-files.html">
- <span class="en">APK Expansion Files</span></a>
- </li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="/google/play/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="/google/play/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="/google/play/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/gcm/index.html">
- <span class="en">Google Cloud Messaging</span></a>
- </div>
- <ul>
- <li><a href="/google/gcm/gs.html">
- <span class="en">Getting Started</span></a>
- </li>
- <li><a href="/google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
- </li>
- <li><a href="/google/gcm/demo.html">
- <span class="en">Demo App Tutorial</span></a>
- </li>
- <li><a href="/google/gcm/adv.html">
- <span class="en">Advanced Topics</span></a>
- </li>
- <li><a href="/google/gcm/c2dm.html">
- <span class="en">Migration</span></a>
- </li>
- <li id="gcm-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gcm-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/backup/index.html">
- Android Backup Service</a>
- </div>
- <ul>
- <li><a href="/google/backup/signup.html">
- Register</a>
- </li>
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-
-
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-
-
-
-
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-
-
-
-
-
-
-
-
-
-
-
-<div class="sum-details-links">
-
-Summary:
-
-
-
-
-
-
-
-
-
- <a href="#pubctors">Ctors</a>
-
-
-
-
- &#124; <a href="#pubmethods">Methods</a>
-
-
-
-
- &#124; <a href="#inhmethods">Inherited Methods</a>
-
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-
-</div><!-- end sum-details-links -->
-<div class="api-level">
-
-
-
-
-</div>
-</div><!-- end api-info-block -->
-
-
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
- public
- static
- final
-
- class
-<h1 itemprop="name">MulticastResult.Builder</h1>
-
-
-
-
- extends Object<br/>
-
-
-
-
-
-
-
-
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-">
-<table class="jd-inheritance-table">
-
-
- <tr>
-
- <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
- </tr>
-
-
- <tr>
-
- <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
-
- <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gcm.server.MulticastResult.Builder</td>
- </tr>
-
-
-</table>
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Summary</h2>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- </nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html#MulticastResult.Builder(int, int, int, long)">MulticastResult.Builder</a></span>(int success, int failure, int canonicalIds, long multicastId)</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html#addResult(com.google.android.gcm.server.Result)">addResult</a></span>(<a href="/reference/com/google/android/gcm/server/Result.html">Result</a> result)</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/MulticastResult.html">MulticastResult</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html#build()">build</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html#retryMulticastIds(java.util.List<java.lang.Long>)">retryMulticastIds</a></span>(List&lt;Long&gt; retryMulticastIds)</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Methods</div></th></tr>
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
- ><img id="inherited-methods-java.lang.Object-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From class
-
- java.lang.Object
-
-<div id="inherited-methods-java.lang.Object">
- <div id="inherited-methods-java.lang.Object-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Object</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">clone</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">equals</span>(Object arg0)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">finalize</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- Class&lt;?&gt;</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">getClass</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">hashCode</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notify</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notifyAll</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">toString</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-
-
-
-
-
-
-
-<!-- XML Attributes -->
-
-
-<!-- Enum Values -->
-
-
-<!-- Constants -->
-
-
-<!-- Fields -->
-
-
-<!-- Public ctors -->
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
-
-
-
-<A NAME="MulticastResult.Builder(int, int, int, long)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
-
- </span>
- <span class="sympad">MulticastResult.Builder</span>
- <span class="normal">(int success, int failure, int canonicalIds, long multicastId)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<!-- Protected ctors -->
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-<!-- Public methdos -->
-
-<h2>Public Methods</h2>
-
-
-
-<A NAME="addResult(com.google.android.gcm.server.Result)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a>
- </span>
- <span class="sympad">addResult</span>
- <span class="normal">(<a href="/reference/com/google/android/gcm/server/Result.html">Result</a> result)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="build()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/MulticastResult.html">MulticastResult</a>
- </span>
- <span class="sympad">build</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="retryMulticastIds(java.util.List<java.lang.Long>)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/MulticastResult.Builder.html">MulticastResult.Builder</a>
- </span>
- <span class="sympad">retryMulticastIds</span>
- <span class="normal">(List&lt;Long&gt; retryMulticastIds)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-
-
-
-<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-
-<div id="footer" class="wrap" >
-
-
- <div id="copyright">
-
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="/license.html">
- Content License</a>.
- </div>
- <div id="build_info">
-
-<script src="/timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
-
- </div>
-
-
- <div id="footerlinks">
-
- <p>
- <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
- <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
- <a href="/support.html">Support</a>
- </p>
- </div>
-
-</div> <!-- end footer -->
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
-</div> <!-- end body-content -->
-
-
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/reference/com/google/android/gcm/server/Result.Builder.html b/docs/html/reference/com/google/android/gcm/server/Result.Builder.html
deleted file mode 100644
index 254120d..0000000
--- a/docs/html/reference/com/google/android/gcm/server/Result.Builder.html
+++ /dev/null
@@ -1,1275 +0,0 @@
-<!DOCTYPE html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
-<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-<title>Result.Builder | Android Developers</title>
-
-<!-- STYLESHEETS -->
-<link rel="stylesheet"
-href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
-<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
-
-
-
-<!-- JAVASCRIPT -->
-<script src="//www.google.com/jsapi" type="text/javascript"></script>
-<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
-<script type="text/javascript">
- var toRoot = "/";
-
- var devsite = false;
-
-</script>
-<script src="/assets/js/docs.js" type="text/javascript"></script>
-
-<script src="/gms_navtree_data.js" type="text/javascript"></script>
-<script src="/gcm_navtree_data.js" type="text/javascript"></script>
-
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-5831155-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body class="gc-documentation google
- develop" itemscope itemtype="http://schema.org/Article">
- <div id="doc-api-level" class="" style="display:none"></div>
- <a name="top"></a>
-
- <!-- Header -->
- <div id="header">
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="/index.html">
- <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="/design/index.html"
- zh-TW-lang="設計"
- zh-CN-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="/develop/index.html"
- zh-TW-lang="開發"
- zh-CN-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="/distribute/index.html"
- zh-TW-lang="發佈"
- zh-CN-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
-
- <!-- New Search -->
- <div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="/about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
-
-
-
-
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-CN">中文 (中国)</option>
- <option value="zh-TW">中文 (台灣)</option>
- </select>
- </div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
-
-
-
-
- <br class="clearfix" />
- </div>
- <div class="bottom"></div>
- </div>
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
-onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
-onkeydown="return search_changed(event, true, '/')"
-onkeyup="return search_changed(event, false, '/')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div>
- </div>
- <div id="search_filtered_wrapper">
- <div id="search_filtered_div" class="no-display">
- <ul id="search_filtered">
- </ul>
- </div>
- </div>
-
- </div>
- <!-- /New Search>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-9">
- <ul>
- <li class="design">
- <ul>
- <li><a href="/design/index.html">Get Started</a></li>
- <li><a href="/design/style/index.html">Style</a></li>
- <li><a href="/design/patterns/index.html">Patterns</a></li>
- <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="/design/downloads/index.html">Downloads</a></li>
- <li><a href="/design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
- </li>
- <li><a href="/google/index.html">Google Services</a>
- </li>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="/distribute/index.html">Google Play</a></li>
- <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
- <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
- <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
- <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
- <li><a href="/distribute/open.html">Open Distribution</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <!-- /Expanded quicknav -->
- </div>
- </div>
- <!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-
-
-
-
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 develop" style="width:100%">
- <li class="training"><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="/google/index.html"
- >Google Services</a>
- </li>
- </ul>
- </div>
-
- </div>
- <!-- /Sendondary x-nav -->
-
-
-
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
-
-
-
-<ul id="nav">
- <li class="nav-section">
- <div class="nav-section-header empty"><a href="/google/index.html">
- <span class="en">Overview</span>
- </a></div>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play-services/index.html">
- <span class="en">Google Play Services</span></a>
- </div>
- <ul>
- <li><a href="/google/play-services/setup.html">
- <span class="en">Setup</span></a>
- </li>
-
- <li><a href="/google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
-
- <li><a href="/google/play-services/plus.html">
- <span class="en">Google+</span></a>
- </li>
-
- <li><a href="/google/play-services/maps.html">
- <span class="en">Google Maps</span></a>
- </li>
-
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
-
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/billing/index.html">
- <span class="en">Google Play In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/billing/billing_overview.html">
- <span class="en">Overview</span></a>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
- <span class="en">Version 3 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
- <span class="en">Version 2 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/v2/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/v2/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a></li>
- <li><a href="/google/play/billing/v2/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li><a href="/google/play/billing/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a>
- </li>
- <li><a href="/google/play/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="/google/play/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/versions.html">
- <span class="en">Version Notes</span></a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/dist.html">
- <span class="en">Google Play Distribution</span></a>
- </div>
- <ul>
- <li><a href="/google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
-
- <li><a href="/google/play/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="/google/play/expansion-files.html">
- <span class="en">APK Expansion Files</span></a>
- </li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="/google/play/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="/google/play/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="/google/play/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/gcm/index.html">
- <span class="en">Google Cloud Messaging</span></a>
- </div>
- <ul>
- <li><a href="/google/gcm/gs.html">
- <span class="en">Getting Started</span></a>
- </li>
- <li><a href="/google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
- </li>
- <li><a href="/google/gcm/demo.html">
- <span class="en">Demo App Tutorial</span></a>
- </li>
- <li><a href="/google/gcm/adv.html">
- <span class="en">Advanced Topics</span></a>
- </li>
- <li><a href="/google/gcm/c2dm.html">
- <span class="en">Migration</span></a>
- </li>
- <li id="gcm-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gcm-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/backup/index.html">
- Android Backup Service</a>
- </div>
- <ul>
- <li><a href="/google/backup/signup.html">
- Register</a>
- </li>
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-
-
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-
-
-
-
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-
-
-
-
-
-
-
-
-
-
-
-<div class="sum-details-links">
-
-Summary:
-
-
-
-
-
-
-
-
-
- <a href="#pubctors">Ctors</a>
-
-
-
-
- &#124; <a href="#pubmethods">Methods</a>
-
-
-
-
- &#124; <a href="#inhmethods">Inherited Methods</a>
-
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-
-</div><!-- end sum-details-links -->
-<div class="api-level">
-
-
-
-
-</div>
-</div><!-- end api-info-block -->
-
-
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
- public
- static
- final
-
- class
-<h1 itemprop="name">Result.Builder</h1>
-
-
-
-
- extends Object<br/>
-
-
-
-
-
-
-
-
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-">
-<table class="jd-inheritance-table">
-
-
- <tr>
-
- <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
- </tr>
-
-
- <tr>
-
- <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
-
- <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gcm.server.Result.Builder</td>
- </tr>
-
-
-</table>
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Summary</h2>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- </nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#Result.Builder()">Result.Builder</a></span>()</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/Result.html">Result</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#build()">build</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#canonicalRegistrationId(java.lang.String)">canonicalRegistrationId</a></span>(String value)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#errorCode(java.lang.String)">errorCode</a></span>(String value)</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gcm/server/Result.Builder.html#messageId(java.lang.String)">messageId</a></span>(String value)</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Methods</div></th></tr>
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
- ><img id="inherited-methods-java.lang.Object-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From class
-
- java.lang.Object
-
-<div id="inherited-methods-java.lang.Object">
- <div id="inherited-methods-java.lang.Object-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Object</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">clone</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">equals</span>(Object arg0)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">finalize</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- Class&lt;?&gt;</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">getClass</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">hashCode</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notify</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notifyAll</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">toString</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-
-
-
-
-
-
-
-<!-- XML Attributes -->
-
-
-<!-- Enum Values -->
-
-
-<!-- Constants -->
-
-
-<!-- Fields -->
-
-
-<!-- Public ctors -->
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
-
-
-
-<A NAME="Result.Builder()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
-
- </span>
- <span class="sympad">Result.Builder</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<!-- Protected ctors -->
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-<!-- Public methdos -->
-
-<h2>Public Methods</h2>
-
-
-
-<A NAME="build()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/Result.html">Result</a>
- </span>
- <span class="sympad">build</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="canonicalRegistrationId(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a>
- </span>
- <span class="sympad">canonicalRegistrationId</span>
- <span class="normal">(String value)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="errorCode(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a>
- </span>
- <span class="sympad">errorCode</span>
- <span class="normal">(String value)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="messageId(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gcm/server/Result.Builder.html">Result.Builder</a>
- </span>
- <span class="sympad">messageId</span>
- <span class="normal">(String value)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-
-
-
-<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-
-<div id="footer" class="wrap" >
-
-
- <div id="copyright">
-
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="/license.html">
- Content License</a>.
- </div>
- <div id="build_info">
-
-<script src="/timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
-
- </div>
-
-
- <div id="footerlinks">
-
- <p>
- <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
- <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
- <a href="/support.html">Support</a>
- </p>
- </div>
-
-</div> <!-- end footer -->
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
-</div> <!-- end body-content -->
-
-
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/reference/com/google/android/gms/common/data/DataBufferIterator.html b/docs/html/reference/com/google/android/gms/common/data/DataBufferIterator.html
deleted file mode 100644
index 0c4ddde..0000000
--- a/docs/html/reference/com/google/android/gms/common/data/DataBufferIterator.html
+++ /dev/null
@@ -1,1320 +0,0 @@
-<!DOCTYPE html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
-<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-<title>DataBufferIterator | Android Developers</title>
-
-<!-- STYLESHEETS -->
-<link rel="stylesheet"
-href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
-<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
-
-
-
-<!-- JAVASCRIPT -->
-<script src="//www.google.com/jsapi" type="text/javascript"></script>
-<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
-<script type="text/javascript">
- var toRoot = "/";
-
- var devsite = false;
-
-</script>
-<script src="/assets/js/docs.js" type="text/javascript"></script>
-
-<script src="/gms_navtree_data.js" type="text/javascript"></script>
-<script src="/gcm_navtree_data.js" type="text/javascript"></script>
-
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-5831155-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body class="gc-documentation google
- develop" itemscope itemtype="http://schema.org/Article">
- <div id="doc-api-level" class="" style="display:none"></div>
- <a name="top"></a>
-
- <!-- Header -->
- <div id="header">
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="/index.html">
- <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="/design/index.html"
- zh-TW-lang="設計"
- zh-CN-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="/develop/index.html"
- zh-TW-lang="開發"
- zh-CN-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="/distribute/index.html"
- zh-TW-lang="發佈"
- zh-CN-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
-
- <!-- New Search -->
- <div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="/about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
-
-
-
-
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-CN">中文 (中国)</option>
- <option value="zh-TW">中文 (台灣)</option>
- </select>
- </div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
-
-
-
-
- <br class="clearfix" />
- </div>
- <div class="bottom"></div>
- </div>
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
-onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
-onkeydown="return search_changed(event, true, '/')"
-onkeyup="return search_changed(event, false, '/')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div>
- </div>
- <div id="search_filtered_wrapper">
- <div id="search_filtered_div" class="no-display">
- <ul id="search_filtered">
- </ul>
- </div>
- </div>
-
- </div>
- <!-- /New Search>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-9">
- <ul>
- <li class="design">
- <ul>
- <li><a href="/design/index.html">Get Started</a></li>
- <li><a href="/design/style/index.html">Style</a></li>
- <li><a href="/design/patterns/index.html">Patterns</a></li>
- <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="/design/downloads/index.html">Downloads</a></li>
- <li><a href="/design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
- </li>
- <li><a href="/google/index.html">Google Services</a>
- </li>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="/distribute/index.html">Google Play</a></li>
- <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
- <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
- <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
- <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
- <li><a href="/distribute/open.html">Open Distribution</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <!-- /Expanded quicknav -->
- </div>
- </div>
- <!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-
-
-
-
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 develop" style="width:100%">
- <li class="training"><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="/google/index.html"
- >Google Services</a>
- </li>
- </ul>
- </div>
-
- </div>
- <!-- /Sendondary x-nav -->
-
-
-
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
-
-
-
-<ul id="nav">
- <li class="nav-section">
- <div class="nav-section-header empty"><a href="/google/index.html">
- <span class="en">Overview</span>
- </a></div>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play-services/index.html">
- <span class="en">Google Play Services</span></a>
- </div>
- <ul>
- <li><a href="/google/play-services/setup.html">
- <span class="en">Setup</span></a>
- </li>
-
- <li><a href="/google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
-
- <li><a href="/google/play-services/plus.html">
- <span class="en">Google+</span></a>
- </li>
-
- <li><a href="/google/play-services/maps.html">
- <span class="en">Google Maps</span></a>
- </li>
-
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
-
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/billing/index.html">
- <span class="en">Google Play In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/billing/billing_overview.html">
- <span class="en">Overview</span></a>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
- <span class="en">Version 3 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
- <span class="en">Version 2 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/v2/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/v2/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a></li>
- <li><a href="/google/play/billing/v2/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li><a href="/google/play/billing/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a>
- </li>
- <li><a href="/google/play/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="/google/play/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/versions.html">
- <span class="en">Version Notes</span></a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/dist.html">
- <span class="en">Google Play Distribution</span></a>
- </div>
- <ul>
- <li><a href="/google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
-
- <li><a href="/google/play/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="/google/play/expansion-files.html">
- <span class="en">APK Expansion Files</span></a>
- </li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="/google/play/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="/google/play/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="/google/play/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/gcm/index.html">
- <span class="en">Google Cloud Messaging</span></a>
- </div>
- <ul>
- <li><a href="/google/gcm/gs.html">
- <span class="en">Getting Started</span></a>
- </li>
- <li><a href="/google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
- </li>
- <li><a href="/google/gcm/demo.html">
- <span class="en">Demo App Tutorial</span></a>
- </li>
- <li><a href="/google/gcm/adv.html">
- <span class="en">Advanced Topics</span></a>
- </li>
- <li><a href="/google/gcm/c2dm.html">
- <span class="en">Migration</span></a>
- </li>
- <li id="gcm-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gcm-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/backup/index.html">
- Android Backup Service</a>
- </div>
- <ul>
- <li><a href="/google/backup/signup.html">
- Register</a>
- </li>
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-
-
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-
-
-
-
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="sum-details-links">
-
-Summary:
-
-
-
-
-
-
-
-
-
- <a href="#pubctors">Ctors</a>
-
-
-
-
- &#124; <a href="#pubmethods">Methods</a>
-
-
-
-
- &#124; <a href="#inhmethods">Inherited Methods</a>
-
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-
-</div><!-- end sum-details-links -->
-<div class="api-level">
-
-
-
-
-</div>
-</div><!-- end api-info-block -->
-
-
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
- public
-
- final
-
- class
-<h1 itemprop="name">DataBufferIterator</h1>
-
-
-
-
- extends Object<br/>
-
-
-
-
-
-
- implements
-
- Iterator&lt;E&gt;
-
-
-
-
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-">
-<table class="jd-inheritance-table">
-
-
- <tr>
-
- <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
- </tr>
-
-
- <tr>
-
- <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
-
- <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.common.data.DataBufferIterator&lt;T&gt;</td>
- </tr>
-
-
-</table>
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Class Overview</h2>
-<p itemprop="articleBody">Iterator used to walk a <code>DataBuffer</code>.
-</p>
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Summary</h2>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- </nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferIterator.html#DataBufferIterator(com.google.android.gms.common.data.DataBuffer<T>)">DataBufferIterator</a></span>(<a href="/reference/com/google/android/gms/common/data/DataBuffer.html">DataBuffer</a>&lt;T&gt; dataBuffer)</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferIterator.html#hasNext()">hasNext</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- T</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferIterator.html#next()">next</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferIterator.html#remove()">remove</a></span>()</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Methods</div></th></tr>
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
- ><img id="inherited-methods-java.lang.Object-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From class
-
- java.lang.Object
-
-<div id="inherited-methods-java.lang.Object">
- <div id="inherited-methods-java.lang.Object-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Object</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">clone</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">equals</span>(Object arg0)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">finalize</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- Class&lt;?&gt;</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">getClass</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">hashCode</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notify</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notifyAll</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">toString</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.util.Iterator" class="jd-expando-trigger closed"
- ><img id="inherited-methods-java.util.Iterator-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From interface
-
- java.util.Iterator
-
-<div id="inherited-methods-java.util.Iterator">
- <div id="inherited-methods-java.util.Iterator-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-java.util.Iterator-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
- abstract
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">hasNext</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
- abstract
-
-
-
-
- E</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">next</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
- abstract
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">remove</span>()</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-
-
-
-
-
-
-
-<!-- XML Attributes -->
-
-
-<!-- Enum Values -->
-
-
-<!-- Constants -->
-
-
-<!-- Fields -->
-
-
-<!-- Public ctors -->
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
-
-
-
-<A NAME="DataBufferIterator(com.google.android.gms.common.data.DataBuffer<T>)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
-
- </span>
- <span class="sympad">DataBufferIterator</span>
- <span class="normal">(<a href="/reference/com/google/android/gms/common/data/DataBuffer.html">DataBuffer</a>&lt;T&gt; dataBuffer)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<!-- Protected ctors -->
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-<!-- Public methdos -->
-
-<h2>Public Methods</h2>
-
-
-
-<A NAME="hasNext()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- boolean
- </span>
- <span class="sympad">hasNext</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="next()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- T
- </span>
- <span class="sympad">next</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="remove()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- void
- </span>
- <span class="sympad">remove</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-
-
-
-<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-
-<div id="footer" class="wrap" >
-
-
- <div id="copyright">
-
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="/license.html">
- Content License</a>.
- </div>
- <div id="build_info">
-
-<script src="/timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
-
- </div>
-
-
- <div id="footerlinks">
-
- <p>
- <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
- <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
- <a href="/support.html">Support</a>
- </p>
- </div>
-
-</div> <!-- end footer -->
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
-</div> <!-- end body-content -->
-
-
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/reference/com/google/android/gms/common/data/DataBufferRef.html b/docs/html/reference/com/google/android/gms/common/data/DataBufferRef.html
deleted file mode 100644
index a0ce172..0000000
--- a/docs/html/reference/com/google/android/gms/common/data/DataBufferRef.html
+++ /dev/null
@@ -1,1875 +0,0 @@
-<!DOCTYPE html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
-<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-<title>DataBufferRef | Android Developers</title>
-
-<!-- STYLESHEETS -->
-<link rel="stylesheet"
-href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
-<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
-
-
-
-<!-- JAVASCRIPT -->
-<script src="//www.google.com/jsapi" type="text/javascript"></script>
-<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
-<script type="text/javascript">
- var toRoot = "/";
-
- var devsite = false;
-
-</script>
-<script src="/assets/js/docs.js" type="text/javascript"></script>
-
-<script src="/gms_navtree_data.js" type="text/javascript"></script>
-<script src="/gcm_navtree_data.js" type="text/javascript"></script>
-
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-5831155-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body class="gc-documentation google
- develop" itemscope itemtype="http://schema.org/Article">
- <div id="doc-api-level" class="" style="display:none"></div>
- <a name="top"></a>
-
- <!-- Header -->
- <div id="header">
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="/index.html">
- <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="/design/index.html"
- zh-TW-lang="設計"
- zh-CN-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="/develop/index.html"
- zh-TW-lang="開發"
- zh-CN-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="/distribute/index.html"
- zh-TW-lang="發佈"
- zh-CN-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
-
- <!-- New Search -->
- <div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="/about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
-
-
-
-
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-CN">中文 (中国)</option>
- <option value="zh-TW">中文 (台灣)</option>
- </select>
- </div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
-
-
-
-
- <br class="clearfix" />
- </div>
- <div class="bottom"></div>
- </div>
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
-onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
-onkeydown="return search_changed(event, true, '/')"
-onkeyup="return search_changed(event, false, '/')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div>
- </div>
- <div id="search_filtered_wrapper">
- <div id="search_filtered_div" class="no-display">
- <ul id="search_filtered">
- </ul>
- </div>
- </div>
-
- </div>
- <!-- /New Search>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-9">
- <ul>
- <li class="design">
- <ul>
- <li><a href="/design/index.html">Get Started</a></li>
- <li><a href="/design/style/index.html">Style</a></li>
- <li><a href="/design/patterns/index.html">Patterns</a></li>
- <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="/design/downloads/index.html">Downloads</a></li>
- <li><a href="/design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
- </li>
- <li><a href="/google/index.html">Google Services</a>
- </li>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="/distribute/index.html">Google Play</a></li>
- <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
- <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
- <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
- <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
- <li><a href="/distribute/open.html">Open Distribution</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <!-- /Expanded quicknav -->
- </div>
- </div>
- <!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-
-
-
-
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 develop" style="width:100%">
- <li class="training"><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="/google/index.html"
- >Google Services</a>
- </li>
- </ul>
- </div>
-
- </div>
- <!-- /Sendondary x-nav -->
-
-
-
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
-
-
-
-<ul id="nav">
- <li class="nav-section">
- <div class="nav-section-header empty"><a href="/google/index.html">
- <span class="en">Overview</span>
- </a></div>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play-services/index.html">
- <span class="en">Google Play Services</span></a>
- </div>
- <ul>
- <li><a href="/google/play-services/setup.html">
- <span class="en">Setup</span></a>
- </li>
-
- <li><a href="/google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
-
- <li><a href="/google/play-services/plus.html">
- <span class="en">Google+</span></a>
- </li>
-
- <li><a href="/google/play-services/maps.html">
- <span class="en">Google Maps</span></a>
- </li>
-
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
-
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/billing/index.html">
- <span class="en">Google Play In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/billing/billing_overview.html">
- <span class="en">Overview</span></a>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
- <span class="en">Version 3 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
- <span class="en">Version 2 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/v2/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/v2/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a></li>
- <li><a href="/google/play/billing/v2/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li><a href="/google/play/billing/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a>
- </li>
- <li><a href="/google/play/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="/google/play/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/versions.html">
- <span class="en">Version Notes</span></a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/dist.html">
- <span class="en">Google Play Distribution</span></a>
- </div>
- <ul>
- <li><a href="/google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
-
- <li><a href="/google/play/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="/google/play/expansion-files.html">
- <span class="en">APK Expansion Files</span></a>
- </li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="/google/play/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="/google/play/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="/google/play/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/gcm/index.html">
- <span class="en">Google Cloud Messaging</span></a>
- </div>
- <ul>
- <li><a href="/google/gcm/gs.html">
- <span class="en">Getting Started</span></a>
- </li>
- <li><a href="/google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
- </li>
- <li><a href="/google/gcm/demo.html">
- <span class="en">Demo App Tutorial</span></a>
- </li>
- <li><a href="/google/gcm/adv.html">
- <span class="en">Advanced Topics</span></a>
- </li>
- <li><a href="/google/gcm/c2dm.html">
- <span class="en">Migration</span></a>
- </li>
- <li id="gcm-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gcm-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/backup/index.html">
- Android Backup Service</a>
- </div>
- <ul>
- <li><a href="/google/backup/signup.html">
- Register</a>
- </li>
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-
-
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-
-
-
-
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-
-
-
-
-
-
-
-
-
-
-
-<div class="sum-details-links">
-
-Summary:
-
-
-
-
-
-
-
- <a href="#lfields">Fields</a>
-
-
-
-
- &#124; <a href="#pubctors">Ctors</a>
-
-
-
-
- &#124; <a href="#pubmethods">Methods</a>
-
-
-
- &#124; <a href="#promethods">Protected Methods</a>
-
-
-
- &#124; <a href="#inhmethods">Inherited Methods</a>
-
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-
-</div><!-- end sum-details-links -->
-<div class="api-level">
-
-
-
-
-</div>
-</div><!-- end api-info-block -->
-
-
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
- public
-
-
- abstract
- class
-<h1 itemprop="name">DataBufferRef</h1>
-
-
-
-
- extends Object<br/>
-
-
-
-
-
-
-
-
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-">
-<table class="jd-inheritance-table">
-
-
- <tr>
-
- <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
- </tr>
-
-
- <tr>
-
- <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
-
- <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.common.data.DataBufferRef</td>
- </tr>
-
-
-</table>
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Class Overview</h2>
-<p itemprop="articleBody">A <code>DataBufferRef</code> provides a pointer to a row in a <code><a href="/reference/com/google/android/gms/common/data/DataBuffer.html">DataBuffer</a></code>. Note that if the
- underlying <code><a href="/reference/com/google/android/gms/common/data/DataBuffer.html">DataBuffer</a></code> is closed, the reference will no longer be valid.
-</p>
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Summary</h2>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- =========== FIELD SUMMARY =========== -->
-<table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
- protected
-
- final
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></nobr></td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#mDataHolder">mDataHolder</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
- protected
-
- final
- int</nobr></td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#mDataRow">mDataRow</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- </nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#DataBufferRef(com.google.android.gms.common.data.DataHolder, int)">DataBufferRef</a></span>(<a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a> holder, int dataRow)</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#equals(java.lang.Object)">equals</a></span>(Object obj)</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#hashCode()">hashCode</a></span>()</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#copyToBuffer(java.lang.String, android.database.CharArrayBuffer)">copyToBuffer</a></span>(String column, CharArrayBuffer dataOut)</nobr>
-
- <div class="jd-descrdiv">Copies the String content in the given column at the position of this reference into a
- <code><a href="/reference/android/database/CharArrayBuffer.html">CharArrayBuffer</a></code>.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#getBoolean(java.lang.String)">getBoolean</a></span>(String column)</nobr>
-
- <div class="jd-descrdiv">Retrieves the boolean value for a given column at the position of this reference.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- byte[]</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#getByteArray(java.lang.String)">getByteArray</a></span>(String column)</nobr>
-
- <div class="jd-descrdiv">Retrieves the byte array value for a given column at the position of this reference.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#getInteger(java.lang.String)">getInteger</a></span>(String column)</nobr>
-
- <div class="jd-descrdiv">Retrieves the integer value for a given column at the position of this reference.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- long</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#getLong(java.lang.String)">getLong</a></span>(String column)</nobr>
-
- <div class="jd-descrdiv">Retrieves the long value for a given column at the position of this reference.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#getString(java.lang.String)">getString</a></span>(String column)</nobr>
-
- <div class="jd-descrdiv">Retrieves the String value for a given column at the position of this reference.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#hasNull(java.lang.String)">hasNull</a></span>(String column)</nobr>
-
- <div class="jd-descrdiv">Returns whether the given column at the position of this reference contains null.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Uri</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataBufferRef.html#parseUri(java.lang.String)">parseUri</a></span>(String column)</nobr>
-
- <div class="jd-descrdiv">Retrieves the column data as a URI if possible, checking for null values.</div>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Methods</div></th></tr>
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
- ><img id="inherited-methods-java.lang.Object-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From class
-
- java.lang.Object
-
-<div id="inherited-methods-java.lang.Object">
- <div id="inherited-methods-java.lang.Object-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Object</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">clone</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">equals</span>(Object arg0)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">finalize</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- Class&lt;?&gt;</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">getClass</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">hashCode</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notify</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notifyAll</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">toString</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-
-
-
-
-
-
-
-<!-- XML Attributes -->
-
-
-<!-- Enum Values -->
-
-
-<!-- Constants -->
-
-
-<!-- Fields -->
-
-
-<!-- ========= FIELD DETAIL ======== -->
-<h2>Fields</h2>
-
-
-
-
-<A NAME="mDataHolder"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
- final
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a>
- </span>
- mDataHolder
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- </div>
-</div>
-
-
-
-<A NAME="mDataRow"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
- final
- int
- </span>
- mDataRow
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- </div>
-</div>
-
-
-
-
-<!-- Public ctors -->
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
-
-
-
-<A NAME="DataBufferRef(com.google.android.gms.common.data.DataHolder, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
-
- </span>
- <span class="sympad">DataBufferRef</span>
- <span class="normal">(<a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a> holder, int dataRow)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<!-- Protected ctors -->
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-<!-- Public methdos -->
-
-<h2>Public Methods</h2>
-
-
-
-<A NAME="equals(java.lang.Object)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- boolean
- </span>
- <span class="sympad">equals</span>
- <span class="normal">(Object obj)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="hashCode()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- int
- </span>
- <span class="sympad">hashCode</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-
-<h2>Protected Methods</h2>
-
-
-
-<A NAME="copyToBuffer(java.lang.String, android.database.CharArrayBuffer)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
-
-
-
- void
- </span>
- <span class="sympad">copyToBuffer</span>
- <span class="normal">(String column, CharArrayBuffer dataOut)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Copies the String content in the given column at the position of this reference into a
- <code><a href="/reference/android/database/CharArrayBuffer.html">CharArrayBuffer</a></code>.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- <tr>
- <th>dataOut</td>
- <td>The <code><a href="/reference/android/database/CharArrayBuffer.html">CharArrayBuffer</a></code> to copy into.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>IllegalArgumentException</td>
- <td>if the column does not exist, the position is invalid, or
- the data holder has been closed.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getBoolean(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
-
-
-
- boolean
- </span>
- <span class="sympad">getBoolean</span>
- <span class="normal">(String column)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the boolean value for a given column at the position of this reference.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The boolean value in that column.</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>IllegalArgumentException</td>
- <td>if the column does not exist, the position is invalid, or
- the data holder has been closed.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getByteArray(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
-
-
-
- byte[]
- </span>
- <span class="sympad">getByteArray</span>
- <span class="normal">(String column)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the byte array value for a given column at the position of this reference.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The byte array value in that column.</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>IllegalArgumentException</td>
- <td>if the column does not exist, the position is invalid, or
- the data holder has been closed.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getInteger(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
-
-
-
- int
- </span>
- <span class="sympad">getInteger</span>
- <span class="normal">(String column)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the integer value for a given column at the position of this reference.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The integer value in that column.</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>IllegalArgumentException</td>
- <td>if the column does not exist, the position is invalid, or
- the data holder has been closed.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getLong(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
-
-
-
- long
- </span>
- <span class="sympad">getLong</span>
- <span class="normal">(String column)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the long value for a given column at the position of this reference.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The long value in that column.</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>IllegalArgumentException</td>
- <td>if the column does not exist, the position is invalid, or
- the data holder has been closed.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getString(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
-
-
-
- String
- </span>
- <span class="sympad">getString</span>
- <span class="normal">(String column)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the String value for a given column at the position of this reference.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The String value in that column.</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>IllegalArgumentException</td>
- <td>if the column does not exist, the position is invalid, or
- the data holder has been closed.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="hasNull(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
-
-
-
- boolean
- </span>
- <span class="sympad">hasNull</span>
- <span class="normal">(String column)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Returns whether the given column at the position of this reference contains null.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to check.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>Whether the column value is null at this position.</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>IllegalArgumentException</td>
- <td>if the column does not exist, the position is invalid, or
- the data holder has been closed.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="parseUri(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- protected
-
-
-
-
- Uri
- </span>
- <span class="sympad">parseUri</span>
- <span class="normal">(String column)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the column data as a URI if possible, checking for null values. Will return null if
- the column contains null.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The column data as a URI, or null if not present.</li></ul>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Throws</h5>
- <table class="jd-tagtable">
- <tr>
- <th>IllegalArgumentException</td>
- <td>if the column does not exist, the position is invalid, or
- the data holder has been closed.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-
-<div id="footer" class="wrap" >
-
-
- <div id="copyright">
-
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="/license.html">
- Content License</a>.
- </div>
- <div id="build_info">
-
-<script src="/timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
-
- </div>
-
-
- <div id="footerlinks">
-
- <p>
- <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
- <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
- <a href="/support.html">Support</a>
- </p>
- </div>
-
-</div> <!-- end footer -->
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
-</div> <!-- end body-content -->
-
-
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/reference/com/google/android/gms/common/data/DataHolder.Builder.html b/docs/html/reference/com/google/android/gms/common/data/DataHolder.Builder.html
deleted file mode 100644
index bd56733..0000000
--- a/docs/html/reference/com/google/android/gms/common/data/DataHolder.Builder.html
+++ /dev/null
@@ -1,1412 +0,0 @@
-<!DOCTYPE html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
-<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-<title>DataHolder.Builder | Android Developers</title>
-
-<!-- STYLESHEETS -->
-<link rel="stylesheet"
-href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
-<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
-
-
-
-<!-- JAVASCRIPT -->
-<script src="//www.google.com/jsapi" type="text/javascript"></script>
-<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
-<script type="text/javascript">
- var toRoot = "/";
-
- var devsite = false;
-
-</script>
-<script src="/assets/js/docs.js" type="text/javascript"></script>
-
-<script src="/gms_navtree_data.js" type="text/javascript"></script>
-<script src="/gcm_navtree_data.js" type="text/javascript"></script>
-
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-5831155-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body class="gc-documentation google
- develop" itemscope itemtype="http://schema.org/Article">
- <div id="doc-api-level" class="" style="display:none"></div>
- <a name="top"></a>
-
- <!-- Header -->
- <div id="header">
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="/index.html">
- <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="/design/index.html"
- zh-TW-lang="設計"
- zh-CN-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="/develop/index.html"
- zh-TW-lang="開發"
- zh-CN-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="/distribute/index.html"
- zh-TW-lang="發佈"
- zh-CN-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
-
- <!-- New Search -->
- <div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="/about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
-
-
-
-
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-CN">中文 (中国)</option>
- <option value="zh-TW">中文 (台灣)</option>
- </select>
- </div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
-
-
-
-
- <br class="clearfix" />
- </div>
- <div class="bottom"></div>
- </div>
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
-onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
-onkeydown="return search_changed(event, true, '/')"
-onkeyup="return search_changed(event, false, '/')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div>
- </div>
- <div id="search_filtered_wrapper">
- <div id="search_filtered_div" class="no-display">
- <ul id="search_filtered">
- </ul>
- </div>
- </div>
-
- </div>
- <!-- /New Search>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-9">
- <ul>
- <li class="design">
- <ul>
- <li><a href="/design/index.html">Get Started</a></li>
- <li><a href="/design/style/index.html">Style</a></li>
- <li><a href="/design/patterns/index.html">Patterns</a></li>
- <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="/design/downloads/index.html">Downloads</a></li>
- <li><a href="/design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
- </li>
- <li><a href="/google/index.html">Google Services</a>
- </li>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="/distribute/index.html">Google Play</a></li>
- <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
- <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
- <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
- <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
- <li><a href="/distribute/open.html">Open Distribution</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <!-- /Expanded quicknav -->
- </div>
- </div>
- <!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-
-
-
-
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 develop" style="width:100%">
- <li class="training"><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="/google/index.html"
- >Google Services</a>
- </li>
- </ul>
- </div>
-
- </div>
- <!-- /Sendondary x-nav -->
-
-
-
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
-
-
-
-<ul id="nav">
- <li class="nav-section">
- <div class="nav-section-header empty"><a href="/google/index.html">
- <span class="en">Overview</span>
- </a></div>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play-services/index.html">
- <span class="en">Google Play Services</span></a>
- </div>
- <ul>
- <li><a href="/google/play-services/setup.html">
- <span class="en">Setup</span></a>
- </li>
-
- <li><a href="/google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
-
- <li><a href="/google/play-services/plus.html">
- <span class="en">Google+</span></a>
- </li>
-
- <li><a href="/google/play-services/maps.html">
- <span class="en">Google Maps</span></a>
- </li>
-
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
-
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/billing/index.html">
- <span class="en">Google Play In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/billing/billing_overview.html">
- <span class="en">Overview</span></a>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
- <span class="en">Version 3 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
- <span class="en">Version 2 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/v2/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/v2/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a></li>
- <li><a href="/google/play/billing/v2/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li><a href="/google/play/billing/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a>
- </li>
- <li><a href="/google/play/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="/google/play/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/versions.html">
- <span class="en">Version Notes</span></a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/dist.html">
- <span class="en">Google Play Distribution</span></a>
- </div>
- <ul>
- <li><a href="/google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
-
- <li><a href="/google/play/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="/google/play/expansion-files.html">
- <span class="en">APK Expansion Files</span></a>
- </li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="/google/play/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="/google/play/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="/google/play/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/gcm/index.html">
- <span class="en">Google Cloud Messaging</span></a>
- </div>
- <ul>
- <li><a href="/google/gcm/gs.html">
- <span class="en">Getting Started</span></a>
- </li>
- <li><a href="/google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
- </li>
- <li><a href="/google/gcm/demo.html">
- <span class="en">Demo App Tutorial</span></a>
- </li>
- <li><a href="/google/gcm/adv.html">
- <span class="en">Advanced Topics</span></a>
- </li>
- <li><a href="/google/gcm/c2dm.html">
- <span class="en">Migration</span></a>
- </li>
- <li id="gcm-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gcm-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/backup/index.html">
- Android Backup Service</a>
- </div>
- <ul>
- <li><a href="/google/backup/signup.html">
- Register</a>
- </li>
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-
-
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-
-
-
-
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-
-
-
-
-
-
-
-
-
-
-
-<div class="sum-details-links">
-
-Summary:
-
-
-
-
-
-
-
-
-
-
-
- <a href="#pubmethods">Methods</a>
-
-
-
-
- &#124; <a href="#inhmethods">Inherited Methods</a>
-
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-
-</div><!-- end sum-details-links -->
-<div class="api-level">
-
-
-
-
-</div>
-</div><!-- end api-info-block -->
-
-
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
- public
- static
-
-
- class
-<h1 itemprop="name">DataHolder.Builder</h1>
-
-
-
-
- extends Object<br/>
-
-
-
-
-
-
-
-
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-">
-<table class="jd-inheritance-table">
-
-
- <tr>
-
- <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
- </tr>
-
-
- <tr>
-
- <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
-
- <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.common.data.DataHolder.Builder</td>
- </tr>
-
-
-</table>
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Class Overview</h2>
-<p itemprop="articleBody">Helper class to build <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> instances containing arbitrary data.
- <p>
- Note that the constructor is private; use DataHolder.builder() to create
- instances of this class.
-</p>
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Summary</h2>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html#build(int, android.os.Bundle)">build</a></span>(int statusCode, Bundle metadata)</nobr>
-
- <div class="jd-descrdiv">Instantiate an <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> from this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> with the given status code
- and metadata.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html#build(int)">build</a></span>(int statusCode)</nobr>
-
- <div class="jd-descrdiv">Instantiate an <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> from this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> with the given status code
- and null metadata.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html#getCount()">getCount</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html#sort(java.lang.String)">sort</a></span>(String sortColumn)</nobr>
-
- <div class="jd-descrdiv">Sort the rows in this builder based on the standard data type comparisons for the value
- in the provided column.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html#withRow(android.content.ContentValues)">withRow</a></span>(ContentValues values)</nobr>
-
- <div class="jd-descrdiv">Add a new row of data to the <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> will create.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html#withRow(java.util.HashMap<java.lang.String, java.lang.Object>)">withRow</a></span>(HashMap&lt;String,&nbsp;Object&gt; row)</nobr>
-
- <div class="jd-descrdiv">Add a new row of data to the <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> will create.</div>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Methods</div></th></tr>
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
- ><img id="inherited-methods-java.lang.Object-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From class
-
- java.lang.Object
-
-<div id="inherited-methods-java.lang.Object">
- <div id="inherited-methods-java.lang.Object-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Object</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">clone</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">equals</span>(Object arg0)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">finalize</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- Class&lt;?&gt;</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">getClass</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">hashCode</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notify</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notifyAll</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">toString</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-
-
-
-
-
-
-
-<!-- XML Attributes -->
-
-
-<!-- Enum Values -->
-
-
-<!-- Constants -->
-
-
-<!-- Fields -->
-
-
-<!-- Public ctors -->
-
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<!-- Protected ctors -->
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-<!-- Public methdos -->
-
-<h2>Public Methods</h2>
-
-
-
-<A NAME="build(int, android.os.Bundle)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a>
- </span>
- <span class="sympad">build</span>
- <span class="normal">(int statusCode, Bundle metadata)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Instantiate an <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> from this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> with the given status code
- and metadata.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>statusCode</td>
- <td>The status code of this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code>.</td>
- </tr>
- <tr>
- <th>metadata</td>
- <td>The metadata associated with this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> (may be null).</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> representation of this object.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="build(int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a>
- </span>
- <span class="sympad">build</span>
- <span class="normal">(int statusCode)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Instantiate an <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> from this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> with the given status code
- and null metadata.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>statusCode</td>
- <td>The status code of this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code>.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> representation of this object.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getCount()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- int
- </span>
- <span class="sympad">getCount</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The number of rows that the resulting DataHolder will contain.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="sort(java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a>
- </span>
- <span class="sympad">sort</span>
- <span class="normal">(String sortColumn)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Sort the rows in this builder based on the standard data type comparisons for the value
- in the provided column. Calling this multiple times with the same column will not change
- the sort order of the builder. Note that any data which is added after this call will not
- be sorted.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>sortColumn</td>
- <td>The column to sort the rows in this builder by.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> to continue construction.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="withRow(android.content.ContentValues)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a>
- </span>
- <span class="sympad">withRow</span>
- <span class="normal">(ContentValues values)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Add a new row of data to the <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> will create.
- Note that the data must contain an entry for all columns
- <p>
- Currently the only supported value types that are supported are String, Long, and Boolean
- (Integer is also accepted and will be stored as a Long).</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>values</td>
- <td><code><a href="/reference/android/content/ContentValues.html">ContentValues</a></code> containing row data.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> to continue construction.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="withRow(java.util.HashMap<java.lang.String, java.lang.Object>)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a>
- </span>
- <span class="sympad">withRow</span>
- <span class="normal">(HashMap&lt;String,&nbsp;Object&gt; row)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Add a new row of data to the <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> will create.
- <p>
- Currently the only supported value types that are supported are String, Long, and Boolean
- (Integer is also accepted and will be stored as a Long).</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>row</td>
- <td>Map containing row data.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> to continue construction.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-
-
-
-<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-
-<div id="footer" class="wrap" >
-
-
- <div id="copyright">
-
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="/license.html">
- Content License</a>.
- </div>
- <div id="build_info">
-
-<script src="/timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
-
- </div>
-
-
- <div id="footerlinks">
-
- <p>
- <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
- <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
- <a href="/support.html">Support</a>
- </p>
- </div>
-
-</div> <!-- end footer -->
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
-</div> <!-- end body-content -->
-
-
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/reference/com/google/android/gms/common/data/DataHolder.html b/docs/html/reference/com/google/android/gms/common/data/DataHolder.html
deleted file mode 100644
index be17f3c..0000000
--- a/docs/html/reference/com/google/android/gms/common/data/DataHolder.html
+++ /dev/null
@@ -1,2606 +0,0 @@
-<!DOCTYPE html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
-<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-<title>DataHolder | Android Developers</title>
-
-<!-- STYLESHEETS -->
-<link rel="stylesheet"
-href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
-<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
-
-
-
-<!-- JAVASCRIPT -->
-<script src="//www.google.com/jsapi" type="text/javascript"></script>
-<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
-<script type="text/javascript">
- var toRoot = "/";
-
- var devsite = false;
-
-</script>
-<script src="/assets/js/docs.js" type="text/javascript"></script>
-
-<script src="/gms_navtree_data.js" type="text/javascript"></script>
-<script src="/gcm_navtree_data.js" type="text/javascript"></script>
-
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-5831155-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body class="gc-documentation google
- develop" itemscope itemtype="http://schema.org/Article">
- <div id="doc-api-level" class="" style="display:none"></div>
- <a name="top"></a>
-
- <!-- Header -->
- <div id="header">
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="/index.html">
- <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="/design/index.html"
- zh-TW-lang="設計"
- zh-CN-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="/develop/index.html"
- zh-TW-lang="開發"
- zh-CN-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="/distribute/index.html"
- zh-TW-lang="發佈"
- zh-CN-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
-
- <!-- New Search -->
- <div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="/about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
-
-
-
-
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-CN">中文 (中国)</option>
- <option value="zh-TW">中文 (台灣)</option>
- </select>
- </div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
-
-
-
-
- <br class="clearfix" />
- </div>
- <div class="bottom"></div>
- </div>
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
-onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
-onkeydown="return search_changed(event, true, '/')"
-onkeyup="return search_changed(event, false, '/')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div>
- </div>
- <div id="search_filtered_wrapper">
- <div id="search_filtered_div" class="no-display">
- <ul id="search_filtered">
- </ul>
- </div>
- </div>
-
- </div>
- <!-- /New Search>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-9">
- <ul>
- <li class="design">
- <ul>
- <li><a href="/design/index.html">Get Started</a></li>
- <li><a href="/design/style/index.html">Style</a></li>
- <li><a href="/design/patterns/index.html">Patterns</a></li>
- <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="/design/downloads/index.html">Downloads</a></li>
- <li><a href="/design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
- </li>
- <li><a href="/google/index.html">Google Services</a>
- </li>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="/distribute/index.html">Google Play</a></li>
- <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
- <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
- <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
- <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
- <li><a href="/distribute/open.html">Open Distribution</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <!-- /Expanded quicknav -->
- </div>
- </div>
- <!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-
-
-
-
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 develop" style="width:100%">
- <li class="training"><a href="/training/index.html"
- zh-TW-lang="訓練課程"
- zh-CN-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="/guide/components/index.html"
- zh-TW-lang="API 指南"
- zh-CN-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="/reference/packages.html"
- zh-TW-lang="參考資源"
- zh-CN-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="/tools/index.html"
- zh-TW-lang="相關工具"
- zh-CN-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="/google/index.html"
- >Google Services</a>
- </li>
- </ul>
- </div>
-
- </div>
- <!-- /Sendondary x-nav -->
-
-
-
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
-
-
-
-<ul id="nav">
- <li class="nav-section">
- <div class="nav-section-header empty"><a href="/google/index.html">
- <span class="en">Overview</span>
- </a></div>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play-services/index.html">
- <span class="en">Google Play Services</span></a>
- </div>
- <ul>
- <li><a href="/google/play-services/setup.html">
- <span class="en">Setup</span></a>
- </li>
-
- <li><a href="/google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
-
- <li><a href="/google/play-services/plus.html">
- <span class="en">Google+</span></a>
- </li>
-
- <li><a href="/google/play-services/maps.html">
- <span class="en">Google Maps</span></a>
- </li>
-
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
-
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/billing/index.html">
- <span class="en">Google Play In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/billing/billing_overview.html">
- <span class="en">Overview</span></a>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
- <span class="en">Version 3 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
- <span class="en">Version 2 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/v2/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/v2/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a></li>
- <li><a href="/google/play/billing/v2/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li><a href="/google/play/billing/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a>
- </li>
- <li><a href="/google/play/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="/google/play/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/versions.html">
- <span class="en">Version Notes</span></a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/dist.html">
- <span class="en">Google Play Distribution</span></a>
- </div>
- <ul>
- <li><a href="/google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
-
- <li><a href="/google/play/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="/google/play/expansion-files.html">
- <span class="en">APK Expansion Files</span></a>
- </li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="/google/play/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="/google/play/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="/google/play/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/gcm/index.html">
- <span class="en">Google Cloud Messaging</span></a>
- </div>
- <ul>
- <li><a href="/google/gcm/gs.html">
- <span class="en">Getting Started</span></a>
- </li>
- <li><a href="/google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
- </li>
- <li><a href="/google/gcm/demo.html">
- <span class="en">Demo App Tutorial</span></a>
- </li>
- <li><a href="/google/gcm/adv.html">
- <span class="en">Advanced Topics</span></a>
- </li>
- <li><a href="/google/gcm/c2dm.html">
- <span class="en">Migration</span></a>
- </li>
- <li id="gcm-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gcm-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/backup/index.html">
- Android Backup Service</a>
- </div>
- <ul>
- <li><a href="/google/backup/signup.html">
- Register</a>
- </li>
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-
-
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-
-
-
-
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="sum-details-links">
-
-Summary:
-
- <a href="#nestedclasses">Nested Classes</a>
-
-
-
-
-
-
- &#124; <a href="#constants">Constants</a>
-
-
-
- &#124; <a href="#inhconstants">Inherited Constants</a>
-
-
-
- &#124; <a href="#lfields">Fields</a>
-
-
-
-
- &#124; <a href="#pubctors">Ctors</a>
-
-
-
-
- &#124; <a href="#pubmethods">Methods</a>
-
-
-
-
- &#124; <a href="#inhmethods">Inherited Methods</a>
-
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-
-</div><!-- end sum-details-links -->
-<div class="api-level">
-
-
-
-
-</div>
-</div><!-- end api-info-block -->
-
-
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
- public
-
- final
-
- class
-<h1 itemprop="name">DataHolder</h1>
-
-
-
-
- extends Object<br/>
-
-
-
-
-
-
- implements
-
- Parcelable
-
-
-
-
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-">
-<table class="jd-inheritance-table">
-
-
- <tr>
-
- <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
- </tr>
-
-
- <tr>
-
- <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
-
- <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.common.data.DataHolder</td>
- </tr>
-
-
-</table>
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Class Overview</h2>
-<p itemprop="articleBody">Class for accessing collections of data, organized into columns. This provides the backing
- support for <code><a href="/reference/com/google/android/gms/common/data/DataBuffer.html">DataBuffer</a></code>. Much like a cursor, the holder supports the notion of a current
- position, and has methods for extracting various types of data from named columns.
-</p>
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Summary</h2>
-
-
-
-<!-- ======== NESTED CLASS SUMMARY ======== -->
-<table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
- class</nobr></td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></td>
- <td class="jd-descrcol" width="100%">Helper class to build <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> instances containing arbitrary data.&nbsp;</td>
- </tr>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol">String</td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#NULL">NULL</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
-
-</table>
-
-
-
-
-
-<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="inhconstants" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Constants</div></th></tr>
-
-
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
-
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.os.Parcelable" class="jd-expando-trigger closed"
- ><img id="inherited-constants-android.os.Parcelable-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>From interface
-android.os.Parcelable
-<div id="inherited-constants-android.os.Parcelable">
- <div id="inherited-constants-android.os.Parcelable-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-constants-android.os.Parcelable-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol">int</td>
- <td class="jd-linkcol">CONTENTS_FILE_DESCRIPTOR</td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol">int</td>
- <td class="jd-linkcol">PARCELABLE_WRITE_RETURN_VALUE</td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-
-
-<!-- =========== FIELD SUMMARY =========== -->
-<table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
- public
- static
- final
- DataHolderCreator</nobr></td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#CREATOR">CREATOR</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- </nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#DataHolder(java.lang.String[], android.database.CursorWindow[], int, android.os.Bundle)">DataHolder</a></span>(String[] columns, CursorWindow[] windows, int statusCode, Bundle metadata)</nobr>
-
- <div class="jd-descrdiv">Creates a data holder with the specified data.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- </nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#DataHolder(android.database.AbstractWindowedCursor, int, android.os.Bundle)">DataHolder</a></span>(AbstractWindowedCursor cursor, int statusCode, Bundle metadata)</nobr>
-
- <div class="jd-descrdiv">Creates a data holder wrapping the provided cursor, with provided status code and metadata.</div>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
- static
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#builder(java.lang.String[], java.lang.String)">builder</a></span>(String[] columns, String uniqueColumn)</nobr>
-
- <div class="jd-descrdiv">Get a <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> to create a new <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> manually.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
- static
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#builder(java.lang.String[])">builder</a></span>(String[] columns)</nobr>
-
- <div class="jd-descrdiv">Get a <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> to create a new <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> manually.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#close()">close</a></span>()</nobr>
-
- <div class="jd-descrdiv">Closes the data holder, releasing all of its resources and making it completely invalid.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#copyToBuffer(java.lang.String, int, int, android.database.CharArrayBuffer)">copyToBuffer</a></span>(String column, int row, int windowIndex, CharArrayBuffer dataOut)</nobr>
-
- <div class="jd-descrdiv">Copies the String content in the given column at the provided position into a
- <code><a href="/reference/android/database/CharArrayBuffer.html">CharArrayBuffer</a></code>.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#describeContents()">describeContents</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
- static
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#empty(int, android.os.Bundle)">empty</a></span>(int statusCode, Bundle metadata)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
- static
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#empty(int)">empty</a></span>(int statusCode)</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#getBoolean(java.lang.String, int, int)">getBoolean</a></span>(String column, int row, int windowIndex)</nobr>
-
- <div class="jd-descrdiv">Retrieves the boolean value for a given column at the provided position.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- byte[]</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#getByteArray(java.lang.String, int, int)">getByteArray</a></span>(String column, int row, int windowIndex)</nobr>
-
- <div class="jd-descrdiv">Retrieves the byte array value for a given column at the provided position.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#getCount()">getCount</a></span>()</nobr>
-
- <div class="jd-descrdiv">Gets the number of rows in the data holder.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#getInteger(java.lang.String, int, int)">getInteger</a></span>(String column, int row, int windowIndex)</nobr>
-
- <div class="jd-descrdiv">Retrieves the integer value for a given column at the provided position.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- long</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#getLong(java.lang.String, int, int)">getLong</a></span>(String column, int row, int windowIndex)</nobr>
-
- <div class="jd-descrdiv">Retrieves the long value for a given column at the provided position.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#getStatusCode()">getStatusCode</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#getString(java.lang.String, int, int)">getString</a></span>(String column, int row, int windowIndex)</nobr>
-
- <div class="jd-descrdiv">Retrieves the String value for a given column at the provided position.</div>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#hasNull(java.lang.String, int, int)">hasNull</a></span>(String column, int row, int windowIndex)</nobr>
-
- <div class="jd-descrdiv">Returns whether the given column at the provided position contains null.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#isClosed()">isClosed</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Uri</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#parseUri(java.lang.String, int, int)">parseUri</a></span>(String column, int row, int windowIndex)</nobr>
-
- <div class="jd-descrdiv">Retrieves the column data at the provided position as a URI if possible, checking for null
- values.</div>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#validateContents()">validateContents</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/data/DataHolder.html#writeToParcel(android.os.Parcel, int)">writeToParcel</a></span>(Parcel dest, int flags)</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Methods</div></th></tr>
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
- ><img id="inherited-methods-java.lang.Object-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From class
-
- java.lang.Object
-
-<div id="inherited-methods-java.lang.Object">
- <div id="inherited-methods-java.lang.Object-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Object</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">clone</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">equals</span>(Object arg0)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">finalize</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- Class&lt;?&gt;</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">getClass</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">hashCode</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notify</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notifyAll</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">toString</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.os.Parcelable" class="jd-expando-trigger closed"
- ><img id="inherited-methods-android.os.Parcelable-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From interface
-
- android.os.Parcelable
-
-<div id="inherited-methods-android.os.Parcelable">
- <div id="inherited-methods-android.os.Parcelable-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-android.os.Parcelable-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
- abstract
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">describeContents</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
- abstract
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">writeToParcel</span>(Parcel arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-
-
-
-
-
-
-
-<!-- XML Attributes -->
-
-
-<!-- Enum Values -->
-
-
-<!-- Constants -->
-
-
-<!-- ========= ENUM CONSTANTS DETAIL ======== -->
-<h2>Constants</h2>
-
-
-
-
-<A NAME="NULL"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
- final
- String
- </span>
- NULL
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- <div class="jd-tagdata">
- <span class="jd-tagtitle">Constant Value: </span>
- <span>
-
- "SAFE_PARCELABLE_NULL_STRING"
-
- </span>
- </div>
-
- </div>
-</div>
-
-
-
-
-<!-- Fields -->
-
-
-<!-- ========= FIELD DETAIL ======== -->
-<h2>Fields</h2>
-
-
-
-
-<A NAME="CREATOR"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
- final
- DataHolderCreator
- </span>
- CREATOR
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- </div>
-</div>
-
-
-
-
-<!-- Public ctors -->
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
-
-
-
-<A NAME="DataHolder(java.lang.String[], android.database.CursorWindow[], int, android.os.Bundle)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
-
- </span>
- <span class="sympad">DataHolder</span>
- <span class="normal">(String[] columns, CursorWindow[] windows, int statusCode, Bundle metadata)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Creates a data holder with the specified data.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>columns</td>
- <td>The column names corresponding to the data in the given windows.</td>
- </tr>
- <tr>
- <th>windows</td>
- <td>The <code><a href="/reference/android/database/CursorWindow.html">CursorWindow</a></code> instances holding the data.</td>
- </tr>
- <tr>
- <th>statusCode</td>
- <td>The status code of this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code>.</td>
- </tr>
- <tr>
- <th>metadata</td>
- <td>The metadata associated with this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> (may be null).
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="DataHolder(android.database.AbstractWindowedCursor, int, android.os.Bundle)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
-
- </span>
- <span class="sympad">DataHolder</span>
- <span class="normal">(AbstractWindowedCursor cursor, int statusCode, Bundle metadata)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Creates a data holder wrapping the provided cursor, with provided status code and metadata.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>cursor</td>
- <td>The cursor containing the data.</td>
- </tr>
- <tr>
- <th>statusCode</td>
- <td>The status code of this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code>.</td>
- </tr>
- <tr>
- <th>metadata</td>
- <td>The metadata associated with this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> (may be null).
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<!-- Protected ctors -->
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-<!-- Public methdos -->
-
-<h2>Public Methods</h2>
-
-
-
-<A NAME="builder(java.lang.String[], java.lang.String)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a>
- </span>
- <span class="sympad">builder</span>
- <span class="normal">(String[] columns, String uniqueColumn)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Get a <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> to create a new <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> manually.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>columns</td>
- <td>The array of column names that the object supports.</td>
- </tr>
- <tr>
- <th>uniqueColumn</td>
- <td>The non-null column name that must contain unique values. New rows added
- to the builder with the same value in this column will replace any older rows.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> object to work with.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="builder(java.lang.String[])"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a>
- </span>
- <span class="sympad">builder</span>
- <span class="normal">(String[] columns)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Get a <code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> to create a new <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> manually.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>columns</td>
- <td>The array of column names that the object supports.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/common/data/DataHolder.Builder.html">DataHolder.Builder</a></code> object to work with.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="close()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- void
- </span>
- <span class="sympad">close</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Closes the data holder, releasing all of its resources and making it completely invalid.
-</p></div>
-
- </div>
-</div>
-
-
-<A NAME="copyToBuffer(java.lang.String, int, int, android.database.CharArrayBuffer)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- void
- </span>
- <span class="sympad">copyToBuffer</span>
- <span class="normal">(String column, int row, int windowIndex, CharArrayBuffer dataOut)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Copies the String content in the given column at the provided position into a
- <code><a href="/reference/android/database/CharArrayBuffer.html">CharArrayBuffer</a></code>. This will throw an <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if the column
- does not exist, the position is invalid, or the data holder has been closed.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- <tr>
- <th>row</td>
- <td>The row to retrieve the data from.</td>
- </tr>
- <tr>
- <th>windowIndex</td>
- <td>Index of the cursor window to extract the data from.</td>
- </tr>
- <tr>
- <th>dataOut</td>
- <td>The <code><a href="/reference/android/database/CharArrayBuffer.html">CharArrayBuffer</a></code> to copy into.
-</td>
- </tr>
- </table>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="describeContents()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- int
- </span>
- <span class="sympad">describeContents</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="empty(int, android.os.Bundle)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a>
- </span>
- <span class="sympad">empty</span>
- <span class="normal">(int statusCode, Bundle metadata)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>statusCode</td>
- <td>The status code of this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code>.</td>
- </tr>
- <tr>
- <th>metadata</td>
- <td>The metadata associated with this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> (may be null).</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>An empty <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> object with the given status and null metadata.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="empty(int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
-
-
-
- <a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a>
- </span>
- <span class="sympad">empty</span>
- <span class="normal">(int statusCode)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>statusCode</td>
- <td>The status code of this <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code>.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>An empty <code><a href="/reference/com/google/android/gms/common/data/DataHolder.html">DataHolder</a></code> object with the given status and null metadata.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getBoolean(java.lang.String, int, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- boolean
- </span>
- <span class="sympad">getBoolean</span>
- <span class="normal">(String column, int row, int windowIndex)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the boolean value for a given column at the provided position. This will throw an
- <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if the column does not exist, the position is invalid, or
- the data holder has been closed.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- <tr>
- <th>row</td>
- <td>The row to retrieve the data from.</td>
- </tr>
- <tr>
- <th>windowIndex</td>
- <td>Index of the cursor window to extract the data from.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The boolean value in that column.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getByteArray(java.lang.String, int, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- byte[]
- </span>
- <span class="sympad">getByteArray</span>
- <span class="normal">(String column, int row, int windowIndex)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the byte array value for a given column at the provided position. This will throw
- an <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if the column does not exist, the position is invalid, or
- the data holder has been closed.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- <tr>
- <th>row</td>
- <td>The row to retrieve the data from.</td>
- </tr>
- <tr>
- <th>windowIndex</td>
- <td>Index of the cursor window to extract the data from.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The byte array value in that column.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getCount()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- int
- </span>
- <span class="sympad">getCount</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Gets the number of rows in the data holder.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>the number of rows in the data holder.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getInteger(java.lang.String, int, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- int
- </span>
- <span class="sympad">getInteger</span>
- <span class="normal">(String column, int row, int windowIndex)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the integer value for a given column at the provided position. This will throw an
- <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if the column does not exist, the position is invalid, or
- the data holder has been closed.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- <tr>
- <th>row</td>
- <td>The row to retrieve the data from.</td>
- </tr>
- <tr>
- <th>windowIndex</td>
- <td>Index of the cursor window to extract the data from.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The integer value in that column.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getLong(java.lang.String, int, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- long
- </span>
- <span class="sympad">getLong</span>
- <span class="normal">(String column, int row, int windowIndex)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the long value for a given column at the provided position. This will throw an
- <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if the column does not exist, the position is invalid, or
- the data holder has been closed.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- <tr>
- <th>row</td>
- <td>The row to retrieve the data from.</td>
- </tr>
- <tr>
- <th>windowIndex</td>
- <td>Index of the cursor window to extract the data from.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The long value in that column.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getStatusCode()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- int
- </span>
- <span class="sympad">getStatusCode</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>Service-specific status code indicating whether data was successfully loaded.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="getString(java.lang.String, int, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- String
- </span>
- <span class="sympad">getString</span>
- <span class="normal">(String column, int row, int windowIndex)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the String value for a given column at the provided position. This will throw an
- <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if the column does not exist, the position is invalid, or
- the data holder has been closed.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- <tr>
- <th>row</td>
- <td>The row to retrieve the data from.</td>
- </tr>
- <tr>
- <th>windowIndex</td>
- <td>Index of the cursor window to extract the data from.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The String value in that column.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="hasNull(java.lang.String, int, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- boolean
- </span>
- <span class="sympad">hasNull</span>
- <span class="normal">(String column, int row, int windowIndex)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Returns whether the given column at the provided position contains null. This will throw an
- <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if the column does not exist, the position is invalid, or
- the data holder has been closed.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to check.</td>
- </tr>
- <tr>
- <th>row</td>
- <td>The row to retrieve the data from.</td>
- </tr>
- <tr>
- <th>windowIndex</td>
- <td>Index of the cursor window to extract the data from.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>Whether the column value is null at this position.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="isClosed()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- boolean
- </span>
- <span class="sympad">isClosed</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="parseUri(java.lang.String, int, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- Uri
- </span>
- <span class="sympad">parseUri</span>
- <span class="normal">(String column, int row, int windowIndex)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p>Retrieves the column data at the provided position as a URI if possible, checking for null
- values. This will throw an <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if the column does not exist, the
- position is invalid, or the data holder has been closed.</p></div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Parameters</h5>
- <table class="jd-tagtable">
- <tr>
- <th>column</td>
- <td>The column to retrieve.</td>
- </tr>
- <tr>
- <th>row</td>
- <td>The row to retrieve the data from.</td>
- </tr>
- <tr>
- <th>windowIndex</td>
- <td>Index of the cursor window to extract the data from.</td>
- </tr>
- </table>
- </div>
- <div class="jd-tagdata">
- <h5 class="jd-tagtitle">Returns</h5>
- <ul class="nolist"><li>The column data as a URI, or null if not present.
-</li></ul>
- </div>
-
- </div>
-</div>
-
-
-<A NAME="validateContents()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- void
- </span>
- <span class="sympad">validateContents</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="writeToParcel(android.os.Parcel, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- void
- </span>
- <span class="sympad">writeToParcel</span>
- <span class="normal">(Parcel dest, int flags)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-
-
-
-<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-
-<div id="footer" class="wrap" >
-
-
- <div id="copyright">
-
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="/license.html">
- Content License</a>.
- </div>
- <div id="build_info">
-
-<script src="/timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
-
- </div>
-
-
- <div id="footerlinks">
-
- <p>
- <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
- <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
- <a href="/support.html">Support</a>
- </p>
- </div>
-
-</div> <!-- end footer -->
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
-</div> <!-- end body-content -->
-
-
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html b/docs/html/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html
deleted file mode 100644
index 44d1754..0000000
--- a/docs/html/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html
+++ /dev/null
@@ -1,1674 +0,0 @@
-<!DOCTYPE html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<html>
-<head>
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
-<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-<title>FavaDiagnosticsEntity | Android Developers</title>
-
-<!-- STYLESHEETS -->
-<link rel="stylesheet"
-href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
-<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
-
-
-
-<!-- JAVASCRIPT -->
-<script src="//www.google.com/jsapi" type="text/javascript"></script>
-<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
-<script type="text/javascript">
- var toRoot = "/";
- var devsite = false;
-</script>
-<script src="/assets/js/docs.js" type="text/javascript"></script>
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-5831155-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-<body class="gc-documentation google
- develop" itemscope itemtype="http://schema.org/Article">
- <div id="doc-api-level" class="" style="display:none"></div>
- <a name="top"></a>
-
-<a name="top"></a>
-
- <!-- Header -->
- <div id="header">
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="/index.html">
- <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="/design/index.html"
- zh-tw-lang="設計"
- zh-cn-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="/develop/index.html"
- zh-tw-lang="開發"
- zh-cn-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="/distribute/index.html"
- zh-tw-lang="發佈"
- zh-cn-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
-
- <!-- New Search -->
- <div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="/about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
-
-
-
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-cn">中文 (中国)</option>
- <option value="zh-tw">中文 (台灣)</option>
- </select>
- </div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
-
-
-
-
- <br class="clearfix" />
- </div>
- <div class="bottom"></div>
- </div>
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
-onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
-onkeydown="return search_changed(event, true, '/')"
-onkeyup="return search_changed(event, false, '/')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div>
- </div>
-
- <div class="search_filtered_wrapper reference">
- <div class="suggest-card reference no-display">
- <ul class="search_filtered">
- </ul>
- </div>
- </div>
-
- <div class="search_filtered_wrapper docs">
- <div class="suggest-card dummy no-display">&nbsp;</div>
- <div class="suggest-card develop no-display">
- <ul class="search_filtered">
- </ul>
- <div class="child-card guides no-display">
- </div>
- <div class="child-card training no-display">
- </div>
- </div>
- <div class="suggest-card design no-display">
- <ul class="search_filtered">
- </ul>
- </div>
- <div class="suggest-card distribute no-display">
- <ul class="search_filtered">
- </ul>
- </div>
- </div>
-
- </div>
- <!-- /New Search>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-9">
- <ul>
- <li class="design">
- <ul>
- <li><a href="/design/index.html">Get Started</a></li>
- <li><a href="/design/style/index.html">Style</a></li>
- <li><a href="/design/patterns/index.html">Patterns</a></li>
- <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="/design/downloads/index.html">Downloads</a></li>
- <li><a href="/design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="/training/index.html"
- zh-tw-lang="訓練課程"
- zh-cn-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="/guide/components/index.html"
- zh-tw-lang="API 指南"
- zh-cn-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="/reference/packages.html"
- zh-tw-lang="參考資源"
- zh-cn-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="/tools/index.html"
- zh-tw-lang="相關工具"
- zh-cn-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
- </li>
- <li><a href="/google/index.html">Google Services</a>
- </li>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="/distribute/index.html">Google Play</a></li>
- <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
- <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
- <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
- <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
- <li><a href="/distribute/open.html">Open Distribution</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <!-- /Expanded quicknav -->
- </div>
- </div>
- <!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-
-
-
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 develop" style="width:100%">
- <li class="training"><a href="/training/index.html"
- zh-tw-lang="訓練課程"
- zh-cn-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="/guide/components/index.html"
- zh-tw-lang="API 指南"
- zh-cn-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="/reference/packages.html"
- zh-tw-lang="參考資源"
- zh-cn-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="/tools/index.html"
- zh-tw-lang="相關工具"
- zh-cn-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="/google/index.html"
- >Google Services</a>
- </li>
- </ul>
- </div>
-
- </div>
- <!-- /Sendondary x-nav -->
-
-
-
-
-
-
-
-
-
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
-
-
-
-<ul id="nav">
- <li class="nav-section">
- <div class="nav-section-header empty"><a href="/google/index.html">
- <span class="en">Overview</span>
- </a></div>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play-services/index.html">
- <span class="en">Google Play Services</span></a>
- </div>
- <ul>
- <li><a href="/google/play-services/setup.html">
- <span class="en">Setup</span></a>
- </li>
- <li><a href="/google/play-services/games.html">
- <span class="en">Games</span></a>
- </li>
- <li><a href="/google/play-services/plus.html">
- <span class="en">Google+</span></a>
- </li>
- <li><a href="/google/play-services/maps.html">
- <span class="en">Google Maps</span></a>
- </li>
- <li><a href="/google/play-services/location.html">
- <span class="en">Location</span></a>
- </li>
- <li><a href="/google/play-services/gcm.html">
- <span class="en">GCM</span></a>
- </li>
- <li><a href="/google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
-
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/billing/index.html">
- <span class="en">Google Play In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/billing/billing_overview.html">
- <span class="en">Overview</span></a>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
- <span class="en">Version 3 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
- <span class="en">Version 2 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/v2/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/v2/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a></li>
- <li><a href="/google/play/billing/v2/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li><a href="/google/play/billing/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a>
- </li>
- <li><a href="/google/play/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="/google/play/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/versions.html">
- <span class="en">Version Notes</span></a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/dist.html">
- <span class="en">Google Play Distribution</span></a>
- </div>
- <ul>
- <li><a href="/google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
-
- <li><a href="/google/play/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="/google/play/expansion-files.html">
- <span class="en">APK Expansion Files</span></a>
- </li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="/google/play/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="/google/play/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="/google/play/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/gcm/index.html">
- <span class="en">Google Cloud Messaging</span></a>
- </div>
- <ul>
- <li><a href="/google/gcm/gs.html">
- <span class="en">Getting Started</span></a>
- </li>
- <li><a href="/google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
- </li>
- <li><a href="/google/gcm/demo.html">
- <span class="en">Demo App Tutorial</span></a>
- </li>
- <li><a href="/google/gcm/adv.html">
- <span class="en">Advanced Topics</span></a>
- </li>
- <li><a href="/google/gcm/c2dm.html">
- <span class="en">Migration</span></a>
- </li>
- <li id="gcm-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gcm-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/backup/index.html">
- Android Backup Service</a>
- </div>
- <ul>
- <li><a href="/google/backup/signup.html">
- Register</a>
- </li>
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-
-
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-
-
-
-
-
-
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="sum-details-links">
-
-Summary:
-
-
-
-
-
- <a href="#constants">Constants</a>
-
-
-
- &#124; <a href="#inhconstants">Inherited Constants</a>
-
-
-
- &#124; <a href="#lfields">Fields</a>
-
-
-
-
- &#124; <a href="#pubctors">Ctors</a>
-
-
-
-
- &#124; <a href="#pubmethods">Methods</a>
-
-
-
-
- &#124; <a href="#inhmethods">Inherited Methods</a>
-
-&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
-
-</div><!-- end sum-details-links -->
-<div class="api-level">
-
-
-
-
-</div>
-</div><!-- end api-info-block -->
-
-
-<!-- ======== START OF CLASS DATA ======== -->
-
-<div id="jd-header">
- public
-
-
-
- class
-<h1 itemprop="name">FavaDiagnosticsEntity</h1>
-
-
-
-
- extends Object<br/>
-
-
-
-
-
-
- implements
-
- Parcelable
-
-
-
-
-
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-">
-<table class="jd-inheritance-table">
-
-
- <tr>
-
- <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td>
- </tr>
-
-
- <tr>
-
- <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
-
- <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.common.server.FavaDiagnosticsEntity</td>
- </tr>
-
-
-</table>
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Class Overview</h2>
-<p itemprop="articleBody">Bundle of data defining a single diagnostic view or action. </p>
-
-
-
-
-
-</div><!-- jd-descr -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<div class="jd-descr">
-
-
-<h2>Summary</h2>
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol">String</td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#EXTRA_NAMESPACE">EXTRA_NAMESPACE</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol">String</td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#EXTRA_TYPE_NUM">EXTRA_TYPE_NUM</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol">String</td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#NULL">NULL</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
-
-</table>
-
-
-
-
-
-<!-- =========== ENUM CONSTANT SUMMARY =========== -->
-<table id="inhconstants" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Constants</div></th></tr>
-
-
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
-
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.os.Parcelable" class="jd-expando-trigger closed"
- ><img id="inherited-constants-android.os.Parcelable-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>From interface
-android.os.Parcelable
-<div id="inherited-constants-android.os.Parcelable">
- <div id="inherited-constants-android.os.Parcelable-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-constants-android.os.Parcelable-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol">int</td>
- <td class="jd-linkcol">CONTENTS_FILE_DESCRIPTOR</td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol">int</td>
- <td class="jd-linkcol">PARCELABLE_WRITE_RETURN_VALUE</td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-
-
-<!-- =========== FIELD SUMMARY =========== -->
-<table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
- public
- static
- final
- <a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntityCreator.html">FavaDiagnosticsEntityCreator</a></nobr></td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#CREATOR">CREATOR</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
- public
-
- final
- String</nobr></td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#namespace">namespace</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
- public
-
- final
- int</nobr></td>
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#typeNum">typeNum</a></td>
- <td class="jd-descrcol" width="100%"></td>
- </tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- </nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#FavaDiagnosticsEntity(int, java.lang.String, int)">FavaDiagnosticsEntity</a></span>(int versionCode, String namespace, int typeNum)</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- </nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#FavaDiagnosticsEntity(java.lang.String, int)">FavaDiagnosticsEntity</a></span>(String namespace, int typeNum)</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#describeContents()">describeContents</a></span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html#writeToParcel(android.os.Parcel, int)">writeToParcel</a></span>(Parcel out, int flags)</nobr>
-
- </td></tr>
-
-
-
-</table>
-
-
-
-
-
-
-
-<!-- ========== METHOD SUMMARY =========== -->
-<table id="inhmethods" class="jd-sumtable"><tr><th>
- <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
- <div style="clear:left;">Inherited Methods</div></th></tr>
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
- ><img id="inherited-methods-java.lang.Object-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From class
-
- java.lang.Object
-
-<div id="inherited-methods-java.lang.Object">
- <div id="inherited-methods-java.lang.Object-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- Object</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">clone</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- boolean</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">equals</span>(Object arg0)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">finalize</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- Class&lt;?&gt;</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">getClass</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">hashCode</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notify</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">notifyAll</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
-
-
-
- String</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">toString</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
-
-
- final
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">wait</span>(long arg0)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-
-<tr class="api apilevel-" >
-<td colspan="12">
- <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.os.Parcelable" class="jd-expando-trigger closed"
- ><img id="inherited-methods-android.os.Parcelable-trigger"
- src="/assets/images/triangle-closed.png"
- class="jd-expando-trigger-img" /></a>
-From interface
-
- android.os.Parcelable
-
-<div id="inherited-methods-android.os.Parcelable">
- <div id="inherited-methods-android.os.Parcelable-list"
- class="jd-inheritedlinks">
- </div>
- <div id="inherited-methods-android.os.Parcelable-summary" style="display: none;">
- <table class="jd-sumtable-expando">
-
-
-
-
- <tr class="alt-color api apilevel-" >
- <td class="jd-typecol"><nobr>
- abstract
-
-
-
-
- int</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">describeContents</span>()</nobr>
-
- </td></tr>
-
-
-
- <tr class=" api apilevel-" >
- <td class="jd-typecol"><nobr>
- abstract
-
-
-
-
- void</nobr>
- </td>
- <td class="jd-linkcol" width="100%"><nobr>
- <span class="sympad">writeToParcel</span>(Parcel arg0, int arg1)</nobr>
-
- </td></tr>
-
-
-</table>
- </div>
-</div>
-</td></tr>
-
-
-</table>
-
-
-</div><!-- jd-descr (summary) -->
-
-<!-- Details -->
-
-
-
-
-
-
-
-
-<!-- XML Attributes -->
-
-
-<!-- Enum Values -->
-
-
-<!-- Constants -->
-
-
-<!-- ========= ENUM CONSTANTS DETAIL ======== -->
-<h2>Constants</h2>
-
-
-
-
-<A NAME="EXTRA_NAMESPACE"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
- final
- String
- </span>
- EXTRA_NAMESPACE
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- <div class="jd-tagdata">
- <span class="jd-tagtitle">Constant Value: </span>
- <span>
-
- "namespace"
-
- </span>
- </div>
-
- </div>
-</div>
-
-
-
-<A NAME="EXTRA_TYPE_NUM"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
- final
- String
- </span>
- EXTRA_TYPE_NUM
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- <div class="jd-tagdata">
- <span class="jd-tagtitle">Constant Value: </span>
- <span>
-
- "typeNum"
-
- </span>
- </div>
-
- </div>
-</div>
-
-
-
-<A NAME="NULL"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
- final
- String
- </span>
- NULL
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- <div class="jd-tagdata">
- <span class="jd-tagtitle">Constant Value: </span>
- <span>
-
- "SAFE_PARCELABLE_NULL_STRING"
-
- </span>
- </div>
-
- </div>
-</div>
-
-
-
-
-<!-- Fields -->
-
-
-<!-- ========= FIELD DETAIL ======== -->
-<h2>Fields</h2>
-
-
-
-
-<A NAME="CREATOR"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
- static
- final
- <a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntityCreator.html">FavaDiagnosticsEntityCreator</a>
- </span>
- CREATOR
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- </div>
-</div>
-
-
-
-<A NAME="namespace"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
- final
- String
- </span>
- namespace
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- </div>
-</div>
-
-
-
-<A NAME="typeNum"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
- final
- int
- </span>
- typeNum
- </h4>
- <div class="api-level">
-
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
-
- </div>
-</div>
-
-
-
-
-<!-- Public ctors -->
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<h2>Public Constructors</h2>
-
-
-
-<A NAME="FavaDiagnosticsEntity(int, java.lang.String, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
-
- </span>
- <span class="sympad">FavaDiagnosticsEntity</span>
- <span class="normal">(int versionCode, String namespace, int typeNum)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="FavaDiagnosticsEntity(java.lang.String, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
-
- </span>
- <span class="sympad">FavaDiagnosticsEntity</span>
- <span class="normal">(String namespace, int typeNum)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-<!-- Protected ctors -->
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-<!-- Public methdos -->
-
-<h2>Public Methods</h2>
-
-
-
-<A NAME="describeContents()"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- int
- </span>
- <span class="sympad">describeContents</span>
- <span class="normal">()</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-<A NAME="writeToParcel(android.os.Parcel, int)"></A>
-
-<div class="jd-details api apilevel-">
- <h4 class="jd-details-title">
- <span class="normal">
- public
-
-
-
-
- void
- </span>
- <span class="sympad">writeToParcel</span>
- <span class="normal">(Parcel out, int flags)</span>
- </h4>
- <div class="api-level">
- <div></div>
-
-
-
- </div>
- <div class="jd-details-descr">
-
- <div class="jd-tagdata jd-tagdescr"><p></p></div>
-
- </div>
-</div>
-
-
-
-
-
-<!-- ========= METHOD DETAIL ======== -->
-
-
-
-<!-- ========= END OF CLASS DATA ========= -->
-<A NAME="navbar_top"></A>
-
-<div id="footer" class="wrap" >
-
-
- <div id="copyright">
-
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="/license.html">
- Content License</a>.
- </div>
- <div id="build_info">
-
-<script src="/timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
-
- </div>
-
-
- <div id="footerlinks">
-
- <p>
- <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
- <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
- <a href="/support.html">Support</a>
- </p>
- </div>
-
-</div> <!-- end footer -->
-</div> <!-- jd-content -->
-
-</div><!-- end doc-content -->
-
-</div> <!-- end body-content -->
-
-
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/reference/com/google/android/gms/common/server/package-summary.html b/docs/html/reference/com/google/android/gms/common/server/package-summary.html
deleted file mode 100644
index ee083b7..0000000
--- a/docs/html/reference/com/google/android/gms/common/server/package-summary.html
+++ /dev/null
@@ -1,685 +0,0 @@
-<!DOCTYPE html>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<html>
-<head>
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
-<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
-<title>com.google.android.gms.common.server | Android Developers</title>
-
-<!-- STYLESHEETS -->
-<link rel="stylesheet"
-href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
-<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
-
-
-
-<!-- JAVASCRIPT -->
-<script src="//www.google.com/jsapi" type="text/javascript"></script>
-<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
-<script type="text/javascript">
- var toRoot = "/";
- var devsite = false;
-</script>
-<script src="/assets/js/docs.js" type="text/javascript"></script>
-
-<script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-5831155-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-</script>
-</head>
-
-<body class="gc-documentation google
- develop">
- <div id="doc-api-level" class="" style="display:none"></div>
- <a name="top"></a>
-
-<a name="top"></a>
-
- <!-- Header -->
- <div id="header">
- <div class="wrap" id="header-wrap">
- <div class="col-3 logo">
- <a href="/index.html">
- <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
- </a>
- <div class="btn-quicknav" id="btn-quicknav">
- <a href="#" class="arrow-inactive">Quicknav</a>
- <a href="#" class="arrow-active">Quicknav</a>
- </div>
- </div>
- <ul class="nav-x col-9">
- <li class="design">
- <a href="/design/index.html"
- zh-tw-lang="設計"
- zh-cn-lang="设计"
- ru-lang="Проектирование"
- ko-lang="디자인"
- ja-lang="設計"
- es-lang="Diseñar"
- >Design</a></li>
- <li class="develop"><a href="/develop/index.html"
- zh-tw-lang="開發"
- zh-cn-lang="开发"
- ru-lang="Разработка"
- ko-lang="개발"
- ja-lang="開発"
- es-lang="Desarrollar"
- >Develop</a></li>
- <li class="distribute last"><a href="/distribute/index.html"
- zh-tw-lang="發佈"
- zh-cn-lang="分发"
- ru-lang="Распространение"
- ko-lang="배포"
- ja-lang="配布"
- es-lang="Distribuir"
- >Distribute</a></li>
- </ul>
-
- <!-- New Search -->
- <div class="menu-container">
- <div class="moremenu">
- <div id="more-btn"></div>
- </div>
- <div class="morehover" id="moremenu">
- <div class="top"></div>
- <div class="mid">
- <div class="header">Links</div>
- <ul>
- <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
- <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
- <li><a href="/about/index.html">About Android</a></li>
- </ul>
- <div class="header">Android Sites</div>
- <ul>
- <li><a href="http://www.android.com">Android.com</a></li>
- <li class="active"><a>Android Developers</a></li>
- <li><a href="http://source.android.com">Android Open Source Project</a></li>
- </ul>
-
-
-
- <div class="header">Language</div>
- <div id="language" class="locales">
- <select name="language" onChange="changeLangPref(this.value, true)">
- <option value="en">English</option>
- <option value="es">Español</option>
- <option value="ja">日本語</option>
- <option value="ko">한국어</option>
- <option value="ru">Русский</option>
- <option value="zh-cn">中文 (中国)</option>
- <option value="zh-tw">中文 (台灣)</option>
- </select>
- </div>
- <script type="text/javascript">
- <!--
- loadLangPref();
- //-->
- </script>
-
-
-
-
- <br class="clearfix" />
- </div>
- <div class="bottom"></div>
- </div>
- <div class="search" id="search-container">
- <div class="search-inner">
- <div id="search-btn"></div>
- <div class="left"></div>
- <form onsubmit="return submit_search()">
- <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
-onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
-onkeydown="return search_changed(event, true, '/')"
-onkeyup="return search_changed(event, false, '/')" />
- </form>
- <div class="right"></div>
- <a class="close hide">close</a>
- <div class="left"></div>
- <div class="right"></div>
- </div>
- </div>
-
- <div class="search_filtered_wrapper reference">
- <div class="suggest-card reference no-display">
- <ul class="search_filtered">
- </ul>
- </div>
- </div>
-
- <div class="search_filtered_wrapper docs">
- <div class="suggest-card dummy no-display">&nbsp;</div>
- <div class="suggest-card develop no-display">
- <ul class="search_filtered">
- </ul>
- <div class="child-card guides no-display">
- </div>
- <div class="child-card training no-display">
- </div>
- </div>
- <div class="suggest-card design no-display">
- <ul class="search_filtered">
- </ul>
- </div>
- <div class="suggest-card distribute no-display">
- <ul class="search_filtered">
- </ul>
- </div>
- </div>
-
- </div>
- <!-- /New Search>
-
-
- <!-- Expanded quicknav -->
- <div id="quicknav" class="col-9">
- <ul>
- <li class="design">
- <ul>
- <li><a href="/design/index.html">Get Started</a></li>
- <li><a href="/design/style/index.html">Style</a></li>
- <li><a href="/design/patterns/index.html">Patterns</a></li>
- <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
- <li><a href="/design/downloads/index.html">Downloads</a></li>
- <li><a href="/design/videos/index.html">Videos</a></li>
- </ul>
- </li>
- <li class="develop">
- <ul>
- <li><a href="/training/index.html"
- zh-tw-lang="訓練課程"
- zh-cn-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li><a href="/guide/components/index.html"
- zh-tw-lang="API 指南"
- zh-cn-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li><a href="/reference/packages.html"
- zh-tw-lang="參考資源"
- zh-cn-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li><a href="/tools/index.html"
- zh-tw-lang="相關工具"
- zh-cn-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a>
- <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul>
- </li>
- <li><a href="/google/index.html">Google Services</a>
- </li>
- </ul>
- </li>
- <li class="distribute last">
- <ul>
- <li><a href="/distribute/index.html">Google Play</a></li>
- <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li>
- <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li>
- <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li>
- <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li>
- <li><a href="/distribute/open.html">Open Distribution</a></li>
- </ul>
- </li>
- </ul>
- </div>
- <!-- /Expanded quicknav -->
- </div>
- </div>
- <!-- /Header -->
-
-
- <div id="searchResults" class="wrap" style="display:none;">
- <h2 id="searchTitle">Results</h2>
- <div id="leftSearchControl" class="search-control">Loading...</div>
- </div>
-
-
-
- <!-- Secondary x-nav -->
- <div id="nav-x">
- <div class="wrap">
- <ul class="nav-x col-9 develop" style="width:100%">
- <li class="training"><a href="/training/index.html"
- zh-tw-lang="訓練課程"
- zh-cn-lang="培训"
- ru-lang="Курсы"
- ko-lang="교육"
- ja-lang="トレーニング"
- es-lang="Capacitación"
- >Training</a></li>
- <li class="guide"><a href="/guide/components/index.html"
- zh-tw-lang="API 指南"
- zh-cn-lang="API 指南"
- ru-lang="Руководства по API"
- ko-lang="API 가이드"
- ja-lang="API ガイド"
- es-lang="Guías de la API"
- >API Guides</a></li>
- <li class="reference"><a href="/reference/packages.html"
- zh-tw-lang="參考資源"
- zh-cn-lang="参考"
- ru-lang="Справочник"
- ko-lang="참조문서"
- ja-lang="リファレンス"
- es-lang="Referencia"
- >Reference</a></li>
- <li class="tools"><a href="/tools/index.html"
- zh-tw-lang="相關工具"
- zh-cn-lang="工具"
- ru-lang="Инструменты"
- ko-lang="도구"
- ja-lang="ツール"
- es-lang="Herramientas"
- >Tools</a></li>
- <li class="google"><a href="/google/index.html"
- >Google Services</a>
- </li>
- </ul>
- </div>
-
- </div>
- <!-- /Sendondary x-nav -->
-
-
-
-
-
-
-
-
-
- <div class="wrap clearfix" id="body-content">
- <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
- <div id="devdoc-nav" class="scroll-pane">
-<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
-
-
-
-<ul id="nav">
- <li class="nav-section">
- <div class="nav-section-header empty"><a href="/google/index.html">
- <span class="en">Overview</span>
- </a></div>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play-services/index.html">
- <span class="en">Google Play Services</span></a>
- </div>
- <ul>
- <li><a href="/google/play-services/setup.html">
- <span class="en">Setup</span></a>
- </li>
- <li><a href="/google/play-services/games.html">
- <span class="en">Games</span></a>
- </li>
- <li><a href="/google/play-services/plus.html">
- <span class="en">Google+</span></a>
- </li>
- <li><a href="/google/play-services/maps.html">
- <span class="en">Google Maps</span></a>
- </li>
- <li><a href="/google/play-services/location.html">
- <span class="en">Location</span></a>
- </li>
- <li><a href="/google/play-services/gcm.html">
- <span class="en">GCM</span></a>
- </li>
- <li><a href="/google/play-services/auth.html">
- <span class="en">Authorization</span></a>
- </li>
- <li id="gms-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gms-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
-
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/billing/index.html">
- <span class="en">Google Play In-app Billing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/billing/billing_overview.html">
- <span class="en">Overview</span></a>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
- <span class="en">Version 3 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
- <span class="en">Version 2 API</span></a></div>
- <ul>
- <li><a href="/google/play/billing/v2/billing_integrate.html">
- <span class="en">Implementing the API</span></a></li>
- <li><a href="/google/play/billing/v2/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a></li>
- <li><a href="/google/play/billing/v2/billing_reference.html">
- <span class="en">Reference</span></a></li>
- </ul>
- </li>
- <li><a href="/google/play/billing/billing_subscriptions.html">
- <span class="en">Subscriptions</span></a>
- </li>
- <li><a href="/google/play/billing/billing_best_practices.html">
- <span class="en">Security and Design</span></a>
- </li>
- <li><a href="/google/play/billing/billing_testing.html">
- <span class="en">Testing In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/billing_admin.html">
- <span class="en">Administering In-app Billing</span></a>
- </li>
- <li><a href="/google/play/billing/versions.html">
- <span class="en">Version Notes</span></a>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/dist.html">
- <span class="en">Google Play Distribution</span></a>
- </div>
- <ul>
- <li><a href="/google/play/filters.html">
- <span class="en">Filters on Google Play</span></a>
- </li>
-
- <li><a href="/google/play/publishing/multiple-apks.html">
- <span class="en">Multiple APK Support</span></a>
- </li>
- <li><a href="/google/play/expansion-files.html">
- <span class="en">APK Expansion Files</span></a>
- </li>
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/play/licensing/index.html">
- <span class="en">Application Licensing</span></a>
- </div>
- <ul>
- <li><a href="/google/play/licensing/overview.html">
- <span class="en">Licensing Overview</span></a>
- </li>
- <li><a href="/google/play/licensing/setting-up.html">
- <span class="en">Setting Up for Licensing</span></a>
- </li>
- <li><a href="/google/play/licensing/adding-licensing.html">
- <span class="en">Adding Licensing to Your App</span></a>
- </li>
- <li><a href="/google/play/licensing/licensing-reference.html">
- <span class="en">Licensing Reference</span></a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/gcm/index.html">
- <span class="en">Google Cloud Messaging</span></a>
- </div>
- <ul>
- <li><a href="/google/gcm/gs.html">
- <span class="en">Getting Started</span></a>
- </li>
- <li><a href="/google/gcm/gcm.html">
- <span class="en">Architectural Overview</span></a>
- </li>
- <li><a href="/google/gcm/demo.html">
- <span class="en">Demo App Tutorial</span></a>
- </li>
- <li><a href="/google/gcm/adv.html">
- <span class="en">Advanced Topics</span></a>
- </li>
- <li><a href="/google/gcm/c2dm.html">
- <span class="en">Migration</span></a>
- </li>
- <li id="gcm-tree-list" class="nav-section">
- <div class="nav-section-header">
- <a href="/reference/gcm-packages.html">
- <span class="en">Reference</span>
- </a>
- <div>
- </li>
- </ul>
- </li>
-
-
- <li class="nav-section">
- <div class="nav-section-header"><a href="/google/backup/index.html">
- Android Backup Service</a>
- </div>
- <ul>
- <li><a href="/google/backup/signup.html">
- Register</a>
- </li>
- </ul>
- </li>
-
-</ul>
-
-<script type="text/javascript">
-<!--
- buildToggleLists();
- changeNavLang(getLangPref());
-//-->
-</script>
-
-
-
-
- </div>
- <script type="text/javascript">
- showGoogleRefTree();
-
- </script>
- </div> <!-- end side-nav -->
- <script>
- $(document).ready(function() {
- scrollIntoView("devdoc-nav");
- });
- </script>
-
-
-
-
-
-
-<div class="col-12" id="doc-col">
-
-<div id="api-info-block">
-<div class="api-level">
-
-
-
-
-</div>
-</div>
-
-<div id="jd-header">
- package
- <h1>com.google.android.gms.common.server</h1>
-</div><!-- end header -->
-
-<div id="naMessage"></div>
-
-<div id="jd-content" class="api apilevel-">
-
-
-
-
-
-
-
-
-
-
- <h2>Classes</h2>
- <div class="jd-sumtable">
-
- <table class="jd-sumtable-expando">
- <tr class="alt-color api apilevel-" >
- <td class="jd-linkcol"><a href="/reference/com/google/android/gms/common/server/FavaDiagnosticsEntity.html">FavaDiagnosticsEntity</a></td>
- <td class="jd-descrcol" width="100%">Bundle of data defining a single diagnostic view or action.&nbsp;</td>
- </tr>
- </table>
- </div>
-
-
-
-
-
-
-
-
-
-
-
-
-<div id="footer" class="wrap" >
-
-
- <div id="copyright">
-
- Except as noted, this content is licensed under <a
- href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
- For details and restrictions, see the <a href="/license.html">
- Content License</a>.
- </div>
- <div id="build_info">
-
-<script src="/timestamp.js" type="text/javascript"></script>
-<script>document.write(BUILD_TIMESTAMP)</script>
-
- </div>
-
-
- <div id="footerlinks">
-
- <p>
- <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
- <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
- <a href="/support.html">Support</a>
- </p>
- </div>
-
-</div> <!-- end footer -->
-</div><!-- end jd-content -->
-</div><!-- doc-content -->
-
-</div> <!-- end body-content -->
-
-
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
index d956af2..06eac1a 100644
--- a/docs/html/sdk/installing/installing-adt.jd
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -51,7 +51,6 @@ the software can't be established, click <strong>OK</strong>.</p></li>
-
<h2 id="Configure">Configure the ADT Plugin</h2>
<p>Once Eclipse restarts, you
@@ -71,11 +70,71 @@ To get these packages for your SDK, continue to
<a href="{@docRoot}sdk/installing/adding-packages.html">Adding Platforms and Packages</a>.</p>
+<h2 id="tmgr">Download the ADT Translation Manager Plugin</h2>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Join the translation pilot</h2>
+<p>Google Play is offering <a
+href="{@docRoot}distribute/googleplay/publish/localizing.html#gp-trans">
+translation services</a> as part of a pilot program. If you are interested,
+sign up for the pilot program on the APK page in your Developer Console.</p>
+</div></div>
+
+<p>ADT Translation Manager Plugin is an Android SDK Tools plugin that helps
+you work with strings that you are localizing. It's designed to work
+with the translation services built into the Google Play Developer
+Console that let you quickly find and purchase translations of
+your app from a list of pre-qualified vendors. </p>
+
+<p>The plugin simplifies the management of strings
+during translation. It lets you easily export your default strings
+and upload them directly to the Developer Console, from which you
+can get estimates or purchase translations. When your translations
+are ready, the plugin lets you quickly download and import them
+back into your project. During import, it moves all of the translated resources into
+the correct locations under <code>res/values</code>, so that
+localization works instantly.</p>
+
+<p>For more information about translation services in Google Play, see <a
+href="{@docRoot}distribute/googleplay/publish/localizing.html#gp-trans">Purchase professional translations through the Developer Console</a>.</p>
+
+<p>To install the ADT Translation Manager Plugin follow these steps:</p>
+
+<ol>
+ <li>Install the ADT Plugin, as described above. </li>
+ <li>In Eclipse, select <strong>Help</strong> &gt; <strong>Install New
+Software</strong>.</li>
+ <li>Click <strong>Add</strong>, in the top-right corner.</li>
+ <li>In the Add Repository dialog that appears, enter "Translation Manager Plugin" for the <em>Name</em> and the
+following URL for the <em>Location</em>:
+ <pre>https://dl.google.com/alt/</pre>
+ </li>
+ <li>Click <strong>OK</strong>.
+ <li>In the Available Software dialog, select the checkbox next to Translation Manager Plugin and click
+<strong>Next</strong>.</li>
+ <li>In the next window, you'll see a list of the tools to be downloaded. Click
+<strong>Next</strong>. </li>
+ <li>Read and accept the license agreements, then click <strong>Finish</strong>.
+ <p>If you get a security warning saying that the authenticity or validity of
+the software can't be established, click <strong>OK</strong>.</p></li>
+ <li>When the installation completes, restart Eclipse. </li>
+</ol>
+
+<h4 id="translation-manager-notes">Installation notes</h4>
+<ul>
+<li>The full ADT Plugin must be installed in your Eclipse environment before you install the ADT Translation Manager Plugin.</li>
+<li>ADT Translation Manager Plugin is designed for use with the translation services offered through the Google Play Developer Console. It is not designed for general purpose import/export of strings. </li>
+<li>To use the plugin, you must <a href="{@docRoot}distribute/googleplay/publish/register.html">set up a Developer Console account</a>. </li>
+<li>Currently, translation services are available through the Developer Console only as part of a pilot program. To use the plugin, you must first sign up for the pilot program by visiting the Developer Console.</li>
+<li>If you downloaded ADT as part of the SDK ADT bundle, you may encounter an error when attempting to download the ADT Translation Manager Plugin from the remote repository. In that case, open the <strong>Install New
+Software</strong>, uncheck "Contact all update sites during install to find required software" at the bottom and try again. </li>
+</ul>
-<h2 id="Troubleshooting">Troubleshooting Installation</h2>
+<h2 id="Troubleshooting">Troubleshooting ADT Installation</h2>
<p> If you are having trouble downloading the ADT plugin after following the
steps above, here are some suggestions: </p>
diff --git a/docs/html/tools/publishing/preparing.jd b/docs/html/tools/publishing/preparing.jd
index b1585f0..8e265f6 100644
--- a/docs/html/tools/publishing/preparing.jd
+++ b/docs/html/tools/publishing/preparing.jd
@@ -22,7 +22,7 @@ page.title=Preparing for Release
<ol>
<li><a href="{@docRoot}tools/publishing/publishing_overview.html">Publishing Overview</a></li>
<li><a href="{@docRoot}tools/publishing/app-signing.html">Signing Your Applications</a></li>
- <li><a href="{@docRoot}distribute/googleplay/publish/preparing.html">Publishing Checklist for Google Play</a></li>
+ <li><a href="{@docRoot}distribute/googleplay/publish/preparing.html">Launch Checklist for Google Play</a></li>
</ol>
</div>
</div>
@@ -353,7 +353,7 @@ done testing and you are satisfied that the release version of your application
behaves correctly, you can release your application to users. For more information, see
<a href="{@docRoot}tools/publishing/publishing_overview.html#publishing-release">Releasing Your
Application to Users</a>. If you are publishing your application on Google Play, see
-<a href="{@docRoot}distribute/googleplay/publish/preparing.html">Publishing Checklist
+<a href="{@docRoot}distribute/googleplay/publish/preparing.html">Launch Checklist
for Google Play</a>.</p>
diff --git a/docs/html/tools/publishing/versioning.jd b/docs/html/tools/publishing/versioning.jd
index 8f602b4..a1cfb30 100644
--- a/docs/html/tools/publishing/versioning.jd
+++ b/docs/html/tools/publishing/versioning.jd
@@ -25,7 +25,7 @@ page.title=Versioning Your Applications
<ol>
<li><a href="{@docRoot}tools/publishing/preparing.html">Preparing to Publish Your Application</a></li>
-<li><a href="{@docRoot}distribute/googleplay/publish/preparing.html">Publishing Checklist for Google Play</a></li>
+<li><a href="{@docRoot}distribute/googleplay/publish/preparing.html">Launch Checklist for Google Play</a></li>
<li><a href="{@docRoot}guide/topics/manifest/manifest-intro.html">The AndroidManifest.xml File</a></li>
</ol>
diff --git a/docs/html/training/basics/location/currentlocation.jd b/docs/html/training/basics/location/currentlocation.jd
deleted file mode 100644
index 29b0fa6..0000000
--- a/docs/html/training/basics/location/currentlocation.jd
+++ /dev/null
@@ -1,163 +0,0 @@
-page.title=Obtaining the Current Location
-parent.title=Making Your App Location Aware
-parent.link=index.html
-
-trainingnavtop=true
-previous.title=Using the Location Manager
-previous.link=locationmanager.html
-next.title=Displaying the Location Address
-next.link=geocoding.html
-
-
-@jd:body
-
-
-<!-- This is the training bar -->
-<div id="tb-wrapper">
-<div id="tb">
-
-<h2>This lesson teaches you to</h2>
-<ol>
- <li><a href="currentlocation.html#TaskSetupLocationListener">Set Up the Location Listener</a></li>
- <li><a href="currentlocation.html#TaskHandleLocationUpdates">Handle Multiple Sources of Location Updates</a></li>
- <li><a href="currentlocation.html#TaskGetLastKnownLocation">Use getLastKnownLocation() Wisely</a></li>
- <li><a href="currentlocation.html#TaskTerminateUpdates">Terminate Location Updates</a></li>
-</ol>
-
-<h2>You should also read</h2>
-
-<ul>
- <li><a href="{@docRoot}guide/topics/location/index.html">Location and Maps</a></li>
-</ul>
-
-<h2>Try it out</h2>
-
-<div class="download-box">
-<a href="http://developer.android.com/shareables/training/LocationAware.zip" class="button">Download
- the sample app</a>
-<p class="filename">LocationAware.zip</p>
-</div>
-
-</div>
-</div>
-
-<p>After setting up your application to work with {@link android.location.LocationManager}, you can begin to obtain location updates.</p>
-
-<h2 id="TaskSetupLocationListener">Set Up the Location Listener</h2>
-
-<p>The {@link android.location.LocationManager} class exposes a number of methods for applications to receive location updates. In its simplest form, you register an event listener, identify the location manager from which you'd like to receive location updates, and specify the minimum time and distance intervals at which to receive location updates. The {@link android.location.LocationListener#onLocationChanged(android.location.Location) onLocationChanged()} callback will be invoked with the frequency that correlates with time and distance intervals.</p>
-
-<p>
-In the sample code snippet below, the location listener is set up to receive notifications at least every 10 seconds and if the device moves by more than 10 meters. The other callback methods notify the application any status change coming from the location provider.
-</p>
-
-<pre>
-private final LocationListener listener = new LocationListener() {
-
- &#064;Override
- public void onLocationChanged(Location location) {
- // A new location update is received. Do something useful with it. In this case,
- // we're sending the update to a handler which then updates the UI with the new
- // location.
- Message.obtain(mHandler,
- UPDATE_LATLNG,
- location.getLatitude() + ", " +
- location.getLongitude()).sendToTarget();
-
- ...
- }
- ...
-};
-
-mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
- 10000, // 10-second interval.
- 10, // 10 meters.
- listener);
-</pre>
-
-<h2 id="TaskHandleLocationUpdates">Handle Multiple Sources of Location Updates</h2>
-
-<p>Generally speaking, a location provider with greater accuracy (GPS) requires a longer fix time than one with lower accuracy (network-based). If you want to display location data as quickly as possible and update it as more accurate data becomes available, a common practice is to register a location listener with both GPS and network providers. In the {@link android.location.LocationListener#onLocationChanged(android.location.Location) onLocationChanged()} callback, you'll receive location updates from multiple location providers that may have different timestamps and varying levels of accuracy. You'll need to incorporate logic to disambiguate the location providers and discard updates that are stale and less accurate. The code snippet below demonstrates a sample implementation of this logic.</p>
-
-<pre>
-private static final int TWO_MINUTES = 1000 * 60 * 2;
-
-/** Determines whether one Location reading is better than the current Location fix
- * @param location The new Location that you want to evaluate
- * @param currentBestLocation The current Location fix, to which you want to compare the new one
- */
-protected boolean isBetterLocation(Location location, Location currentBestLocation) {
- if (currentBestLocation == null) {
- // A new location is always better than no location
- return true;
- }
-
- // Check whether the new location fix is newer or older
- long timeDelta = location.getTime() - currentBestLocation.getTime();
- boolean isSignificantlyNewer = timeDelta &gt; TWO_MINUTES;
- boolean isSignificantlyOlder = timeDelta &lt; -TWO_MINUTES;
- boolean isNewer = timeDelta > 0;
-
- // If it's been more than two minutes since the current location, use the new location
- // because the user has likely moved
- if (isSignificantlyNewer) {
- return true;
- // If the new location is more than two minutes older, it must be worse
- } else if (isSignificantlyOlder) {
- return false;
- }
-
- // Check whether the new location fix is more or less accurate
- int accuracyDelta = (int) (location.getAccuracy() - currentBestLocation.getAccuracy());
- boolean isLessAccurate = accuracyDelta &gt; 0;
- boolean isMoreAccurate = accuracyDelta &lt; 0;
- boolean isSignificantlyLessAccurate = accuracyDelta &gt; 200;
-
- // Check if the old and new location are from the same provider
- boolean isFromSameProvider = isSameProvider(location.getProvider(),
- currentBestLocation.getProvider());
-
- // Determine location quality using a combination of timeliness and accuracy
- if (isMoreAccurate) {
- return true;
- } else if (isNewer &amp;&amp; !isLessAccurate) {
- return true;
- } else if (isNewer &amp;&amp; !isSignificantlyLessAccurate &amp;&amp; isFromSameProvider) {
- return true;
- }
- return false;
-}
-
-/** Checks whether two providers are the same */
-private boolean isSameProvider(String provider1, String provider2) {
- if (provider1 == null) {
- return provider2 == null;
- }
- return provider1.equals(provider2);
-}
-</pre>
-
-<h2 id="TaskGetLastKnownLocation">Use getLastKnownLocation() Wisely</h2>
-
-<p>The setup time for getting a reasonable location fix may not be acceptable for certain applications. You should consider calling the {@link android.location.LocationManager#getLastKnownLocation(java.lang.String) getLastKnownLocation()} method which simply queries Android for the last location update previously received by any location providers. Keep in mind that the returned location may be stale. You should check the timestamp and accuracy of the returned location and decide whether it is useful for your application. If you elect to discard the location update returned from {@link android.location.LocationManager#getLastKnownLocation(java.lang.String) getLastKnownLocation()} and wait for fresh updates from the location provider(s), you should consider displaying an appropriate message before location data is received.</p>
-
-<h2 id="TaskTerminateUpdates">Terminate Location Updates</h2>
-
-<p>When you are done with using location data, you should terminate location update to reduce
-unnecessary consumption of power and network bandwidth. For example, if the user navigates away
-from an activity where location updates are displayed, you should stop location update by calling
-{@link android.location.LocationManager#removeUpdates(android.location.LocationListener)
-removeUpdates()} in {@link android.app.Activity#onStop()}. ({@link android.app.Activity#onStop()}
-is called when the activity is no longer visible. If you want to learn more about activity
-lifecycle, read up on the <a
-href="{@docRoot}training/basics/activity-lifecycle/stopping.html">Stopping and Restarting an
-Activity</a> lesson.</p>
-
-<pre>
-protected void onStop() {
- super.onStop();
- mLocationManager.removeUpdates(listener);
-}
-</pre>
-
-<p class="note"><strong>Note:</strong> For applications that need to continuously receive and process location updates like a near-real time mapping application, it is best to incorporate the location update logic in a background service and make use of the system notification bar to make the user aware that location data is being used.</p> \ No newline at end of file
diff --git a/docs/html/training/basics/location/geocoding.jd b/docs/html/training/basics/location/geocoding.jd
deleted file mode 100644
index 3192d14..0000000
--- a/docs/html/training/basics/location/geocoding.jd
+++ /dev/null
@@ -1,98 +0,0 @@
-page.title=Displaying the Location Address
-parent.title=Making Your App Location Aware
-parent.link=index.html
-
-trainingnavtop=true
-previous.title=Obtaining the Current Location
-previous.link=currentlocation.html
-
-@jd:body
-
-
-<!-- This is the training bar -->
-<div id="tb-wrapper">
-<div id="tb">
-
-<h2>This lesson teaches you to</h2>
-<ol>
- <li><a href="geocoding.html#TaskReverseGeocoding">Perform Reverse Geocoding</a></li>
-</ol>
-
-<h2>You should also read</h2>
-
-<ul>
- <li><a href="{@docRoot}guide/topics/location/index.html">Location and Maps</a></li>
-</ul>
-
-<h2>Try it out</h2>
-
-<div class="download-box">
-<a href="http://developer.android.com/shareables/training/LocationAware.zip" class="button">Download
- the sample app</a>
-<p class="filename">LocationAware.zip</p>
-</div>
-
-</div>
-</div>
-
-<p>As shown in previous lessons, location updates are received in the form of latitude and longitude coordinates. While this format is useful for calculating distance or displaying a pushpin on a map, the decimal numbers make no sense to most end users. If you need to display a location to user, it is much more preferable to display the address instead.</p>
-
-<h2 id="TaskReverseGeocoding">Perform Reverse Geocoding</h2>
-
-<p>Reverse-geocoding is the process of translating latitude longitude coordinates to a human-readable address. The {@link android.location.Geocoder} API is available for this purpose. Note that behind the scene, the API is dependent on a web service. If such service is unavailable on the device, the API will throw a "Service not Available exception" or return an empty list of addresses. A helper method called {@link android.location.Geocoder#isPresent()} was added in Android 2.3 (API level 9) to check for the existence of the service.</p>
-
-<p>The following code snippet demonstrates the use of the {@link android.location.Geocoder} API to perform reverse-geocoding. Since the {@link android.location.Geocoder#getFromLocation(double, double, int) getFromLocation()} method is synchronous, you should not invoke it from the UI thread, hence an {@link android.os.AsyncTask} is used in the snippet.</p>
-
-<pre>
-private final LocationListener listener = new LocationListener() {
-
- public void onLocationChanged(Location location) {
- // Bypass reverse-geocoding if the Geocoder service is not available on the
- // device. The isPresent() convenient method is only available on Gingerbread or above.
- if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.GINGERBREAD &amp;&amp; Geocoder.isPresent()) {
- // Since the geocoding API is synchronous and may take a while. You don't want to lock
- // up the UI thread. Invoking reverse geocoding in an AsyncTask.
- (new ReverseGeocodingTask(this)).execute(new Location[] {location});
- }
- }
- ...
-};
-
-// AsyncTask encapsulating the reverse-geocoding API. Since the geocoder API is blocked,
-// we do not want to invoke it from the UI thread.
-private class ReverseGeocodingTask extends AsyncTask&lt;Location, Void, Void&gt; {
- Context mContext;
-
- public ReverseGeocodingTask(Context context) {
- super();
- mContext = context;
- }
-
- &#064;Override
- protected Void doInBackground(Location... params) {
- Geocoder geocoder = new Geocoder(mContext, Locale.getDefault());
-
- Location loc = params[0];
- List&lt;Address&gt; addresses = null;
- try {
- // Call the synchronous getFromLocation() method by passing in the lat/long values.
- addresses = geocoder.getFromLocation(loc.getLatitude(), loc.getLongitude(), 1);
- } catch (IOException e) {
- e.printStackTrace();
- // Update UI field with the exception.
- Message.obtain(mHandler, UPDATE_ADDRESS, e.toString()).sendToTarget();
- }
- if (addresses != null &amp;&amp; addresses.size() &gt; 0) {
- Address address = addresses.get(0);
- // Format the first line of address (if available), city, and country name.
- String addressText = String.format("&#037;s, &#037;s, &#037;s",
- address.getMaxAddressLineIndex() &gt; 0 ? address.getAddressLine(0) : "",
- address.getLocality(),
- address.getCountryName());
- // Update the UI via a message handler.
- Message.obtain(mHandler, UPDATE_ADDRESS, addressText).sendToTarget();
- }
- return null;
- }
-}
-</pre>
diff --git a/docs/html/training/basics/location/index.jd b/docs/html/training/basics/location/index.jd
deleted file mode 100644
index 240bbb2..0000000
--- a/docs/html/training/basics/location/index.jd
+++ /dev/null
@@ -1,50 +0,0 @@
-page.title=Making Your App Location Aware
-page.tags="geolocation","maps"
-
-trainingnavtop=true
-startpage=true
-
-@jd:body
-
-<div id="tb-wrapper">
-<div id="tb">
-
-<h2>Dependencies and prerequisites</h2>
-
-<ul>
- <li>Android 1.0 or higher (2.3+ for the sample app)</li>
-</ul>
-
-<h2>You should also read</h2>
-
-<ul>
- <li><a href="{@docRoot}guide/topics/location/index.html">Location and Maps</a></li>
-</ul>
-
-<h2>Try it out</h2>
-
-<div class="download-box">
-<a href="http://developer.android.com/shareables/training/LocationAware.zip" class="button">Download
- the sample app</a>
-<p class="filename">LocationAware.zip</p>
-</div>
-
-</div>
-</div>
-
-<p>Users bring their mobile devices with them almost everywhere. One of the unique features available to mobile applications is location awareness. Knowing the location and using the information wisely can bring a more contextual experience to your users.</p>
-
-<p>This class teaches you how to incorporate location based services in your Android application. You'll learn a number of methods to receive location updates and related best practices.</p>
-
-<h2>Lessons</h2>
-
-<dl>
- <dt><b><a href="locationmanager.html">Using the Location Manager</a></b></dt>
- <dd>Learn how to set up your application before it can receive location updates in Android.</dd>
-
- <dt><b><a href="currentlocation.html">Obtaining the Current Location</a></b></dt>
- <dd>Learn how to work with underlying location technologies available on the platform to obtain current location.</dd>
-
- <dt><b><a href="geocoding.html">Displaying a Location Address</a></b></dt>
- <dd>Learn how to translate location coordinates into addresses that are readable to users.</dd>
-</dl>
diff --git a/docs/html/training/basics/location/locationmanager.jd b/docs/html/training/basics/location/locationmanager.jd
deleted file mode 100644
index 61abcbd..0000000
--- a/docs/html/training/basics/location/locationmanager.jd
+++ /dev/null
@@ -1,120 +0,0 @@
-page.title=Using the Location Manager
-parent.title=Making Your App Location Aware
-parent.link=index.html
-
-trainingnavtop=true
-next.title=Obtaining the Current Location
-next.link=currentlocation.html
-
-@jd:body
-
-
-<!-- This is the training bar -->
-<div id="tb-wrapper">
-<div id="tb">
-
-<h2>This lesson teaches you to</h2>
-<ol>
- <li><a href="locationmanager.html#TaskDeclarePermissions">Declare Proper Permissions in Android Manifest</a></li>
- <li><a href="locationmanager.html#TaskGetLocationManagerRef">Get a Reference to LocationManager</a></li>
- <li><a href="locationmanager.html#TaskPickLocationProvider">Pick a Location Provider</a></li>
- <li><a href="locationmanager.html#TaskVerifyProvider">Verify the Location Provider is Enabled</a></li>
-</ol>
-
-<h2>You should also read</h2>
-
-<ul>
- <li><a href="{@docRoot}guide/topics/location/index.html">Location and Maps</a></li>
-</ul>
-
-<h2>Try it out</h2>
-
-<div class="download-box">
-<a href="http://developer.android.com/shareables/training/LocationAware.zip" class="button">Download
- the sample app</a>
-<p class="filename">LocationAware.zip</p>
-</div>
-
-</div>
-</div>
-
-<p>Before your application can begin receiving location updates, it needs to perform some simple steps to set up access. In this lesson, you'll learn what these steps entail.</p>
-
-<h2 id="TaskDeclarePermissions">Declare Proper Permissions in Android Manifest</h2>
-
-<p>The first step of setting up location update access is to declare proper permissions in the manifest. If permissions are missing, the application will get a {@link java.lang.SecurityException} at runtime.</p>
-
-<p>Depending on the {@link android.location.LocationManager} methods used, either {@link android.Manifest.permission#ACCESS_COARSE_LOCATION} or {@link android.Manifest.permission#ACCESS_FINE_LOCATION} permission is needed. For example, you need to declare the {@link android.Manifest.permission#ACCESS_COARSE_LOCATION} permission if your application uses a network-based location provider only. The more accurate GPS requires the {@link android.Manifest.permission#ACCESS_FINE_LOCATION} permission.
-Note that declaring the {@link android.Manifest.permission#ACCESS_FINE_LOCATION} permission implies {@link android.Manifest.permission#ACCESS_COARSE_LOCATION} already.</p>
-
-<p>Also, if a network-based location provider is used in the application, you'll need to declare the internet permission as well.</p>
-
-<pre>
-&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
-&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
-</pre>
-
-<h2 id="TaskGetLocationManagerRef">Get a Reference to LocationManager</h2>
-
-<p>{@link android.location.LocationManager} is the main class through which your application can access location services on Android. Similar to other system services, a reference can be obtained from calling the {@link android.content.Context#getSystemService(java.lang.String) getSystemService()} method. If your application intends to receive location updates in the foreground (within an {@link android.app.Activity}), you should usually perform this step in the {@link android.app.Activity#onCreate(android.os.Bundle) onCreate()} method.</p>
-
-<pre>
-LocationManager locationManager =
- (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
-</pre>
-
-<h2 id="TaskPickLocationProvider">Pick a Location Provider</h2>
-
-<p>While not required, most modern Android-powered devices can receive location updates through multiple underlying technologies, which are abstracted to an application as {@link android.location.LocationProvider} objects. Location providers may have different performance characteristics in terms of time-to-fix, accuracy, monetary cost, power consumption, and so on. Generally, a location provider with a greater accuracy, like the GPS, requires a longer fix time than a less accurate one, such as a network-based location provider.</p>
-
-<p>Depending on your application's use case, you have to choose a specific location provider, or multiple providers, based on similar tradeoffs. For example, a points of interest check-in application would require higher location accuracy than say, a retail store locator where a city level location fix would suffice. The snippet below asks for a provider backed by the GPS.</p>
-
-<pre>
-LocationProvider provider =
- locationManager.getProvider(LocationManager.GPS_PROVIDER);
-</pre>
-
-<p>Alternatively, you can provide some input criteria such as accuracy, power requirement, monetary cost, and so on, and let Android decide a closest match location provider. The snippet below asks for a location provider with fine accuracy and no monetary cost. Note that the criteria may not resolve to any providers, in which case a null will be returned. Your application should be prepared to gracefully handle the situation.</p>
-
-<pre>
-// Retrieve a list of location providers that have fine accuracy, no monetary cost, etc
-Criteria criteria = new Criteria();
-criteria.setAccuracy(Criteria.ACCURACY_FINE);
-criteria.setCostAllowed(false);
-...
-String providerName = locManager.getBestProvider(criteria, true);
-
-// If no suitable provider is found, null is returned.
-if (providerName != null) {
- ...
-}
-</pre>
-
-<h2 id="TaskVerifyProvider">Verify the Location Provider is Enabled</h2>
-
-<p>Some location providers such as the GPS can be disabled in Settings. It is good practice to check whether the desired location provider is currently enabled by calling the {@link android.location.LocationManager#isProviderEnabled(java.lang.String) isProviderEnabled()} method. If the location provider is disabled, you can offer the user an opportunity to enable it in Settings by firing an {@link android.content.Intent} with the {@link android.provider.Settings#ACTION_LOCATION_SOURCE_SETTINGS} action.</p>
-
-<pre>
-&#64;Override
-protected void onStart() {
- super.onStart();
-
- // This verification should be done during onStart() because the system calls
- // this method when the user returns to the activity, which ensures the desired
- // location provider is enabled each time the activity resumes from the stopped state.
- LocationManager locationManager =
- (LocationManager) getSystemService(Context.LOCATION_SERVICE);
- final boolean gpsEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
-
- if (!gpsEnabled) {
- // Build an alert dialog here that requests that the user enable
- // the location services, then when the user clicks the "OK" button,
- // call enableLocationSettings()
- }
-}
-
-private void enableLocationSettings() {
- Intent settingsIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
- startActivity(settingsIntent);
-}
-</pre>
diff --git a/docs/html/training/basics/supporting-devices/languages.jd b/docs/html/training/basics/supporting-devices/languages.jd
index 739c282..130848e 100644
--- a/docs/html/training/basics/supporting-devices/languages.jd
+++ b/docs/html/training/basics/supporting-devices/languages.jd
@@ -1,5 +1,6 @@
page.title=Supporting Different Languages
parent.title=Supporting Different Devices
+page.tags="localizing","localization","resources", "formats", "l10n"
parent.link=index.html
trainingnavtop=true
@@ -18,7 +19,8 @@ next.link=screens.html
</ol>
<h2>You should also read</h2>
<ul>
- <li><a href="{@docRoot}guide/topics/resources/localization.html">Localization</a></li>
+ <li><a href="{@docRoot}distribute/googleplay/publish/localizing.html">Localization Checklist</a></li>
+ <li><a href="{@docRoot}guide/topics/resources/localization.html">Localization with Resources</a></li>
</ul>
</div>
</div>
diff --git a/docs/html/training/location/activity-recognition.jd b/docs/html/training/location/activity-recognition.jd
new file mode 100644
index 0000000..79804db
--- /dev/null
+++ b/docs/html/training/location/activity-recognition.jd
@@ -0,0 +1,781 @@
+page.title=Recognizing the User's Current Activity
+
+trainingnavtop=true
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#RequestUpdates">Request Activity Recognition Updates</a></li>
+ <li><a href="#HandleUpdates">Handle Activity Updates</a>
+ <li><a href="#RemoveUpdates">Stop Activity Recognition Updates</a>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li>
+ <a href="{@docRoot}google/play-services/setup.html">Setup Google Play Services SDK</a>
+ </li>
+ <li>
+ <a href="receive-location-updates.html">Receiving Location Updates</a>
+ </li>
+</ul>
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="http://developer.android.com/shareables/training/ActivityRecognition.zip" class="button">Download the sample</a>
+ <p class="filename">ActivityRecognition.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>
+ This lesson shows you how to request activity recognition updates from Location Services.
+ Activity recognition tries to detect the user's current physical activity, such as walking,
+ driving, or standing still. Requests for updates go through an activity recognition client,
+ which, while different from the location client used by location or geofencing, follows a
+ similar pattern. Based on the update interval you choose, Location Services sends out
+ activity information containing one or more possible activities and the confidence level for
+ each one.
+</p>
+<h2 id="RequestUpdates">Request Activity Recognition Updates</h2>
+<p>
+ Requesting activity recognition updates from Location Services is similar to requesting
+ periodic location updates. You send the request through a client, and Location Services sends
+ updates back to your app by means of a {@link android.app.PendingIntent}. However, you need to
+ request a special permission before you request activity updates, and you use a different type
+ of client to make requests. The following sections show how to request the permission,
+ connect the client, and request updates.
+</p>
+<h3>Request permission to receive updates</h3>
+<p>
+ An app that wants to get activity recognition updates must have the permission
+ {@code com.google.android.gms.permission.ACTIVITY_RECOGNITION}. To request this permission for
+ your app, add the following XML element to your manifest as a child element of the
+<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code>
+ element:
+</p>
+<pre>
+&lt;uses-permission
+ android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION"/&gt;
+</pre>
+<p>
+ Activity recognition does not require the permissions
+ {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION} or
+ {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}.
+</p>
+<!-- Check for Google Play services -->
+<h3>Check for Google Play Services</h3>
+<p>
+ Location Services is part of the Google Play services APK. Since it's hard to anticipate the
+ state of the user's device, you should always check that the APK is installed before you attempt
+ to connect to Location Services. To check that the APK is installed, call
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesUtil.html#isGooglePlayServicesAvailable(android.content.Context)">GooglePlayServicesUtil.isGooglePlayServicesAvailable()</a></code>,
+ which returns one of the
+ integer result codes listed in the API reference documentation. If you encounter an error,
+ call
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesUtil.html#getErrorDialog(int, android.app.Activity, int)">GooglePlayServicesUtil.getErrorDialog()</a></code>
+ to retrieve localized dialog that prompts users to take the correct action, then display
+ the dialog in a {@link android.support.v4.app.DialogFragment}. The dialog may allow the
+ user to correct the problem, in which case Google Play services may send a result back to your
+ activity. To handle this result, override the method
+ {@link android.support.v4.app.FragmentActivity#onActivityResult onActivityResult()}
+
+</p>
+<p class="note">
+ <strong>Note:</strong> To make your app compatible with
+ platform version 1.6 and later, the activity that displays the
+ {@link android.support.v4.app.DialogFragment} must subclass
+ {@link android.support.v4.app.FragmentActivity} instead of {@link android.app.Activity}. Using
+ {@link android.support.v4.app.FragmentActivity} also allows you to call
+ {@link android.support.v4.app.FragmentActivity#getSupportFragmentManager
+ getSupportFragmentManager()} to display the {@link android.support.v4.app.DialogFragment}.
+</p>
+<p>
+ Since you usually need to check for Google Play services in more than one place in your code,
+ define a method that encapsulates the check, then call the method before each connection
+ attempt. The following snippet contains all of the code required to check for Google
+ Play services:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ // Global constants
+ /*
+ * Define a request code to send to Google Play services
+ * This code is returned in Activity.onActivityResult
+ */
+ private final static int
+ CONNECTION_FAILURE_RESOLUTION_REQUEST = 9000;
+ ...
+ // Define a DialogFragment that displays the error dialog
+ public static class ErrorDialogFragment extends DialogFragment {
+ // Global field to contain the error dialog
+ private Dialog mDialog;
+ // Default constructor. Sets the dialog field to null
+ public ErrorDialogFragment() {
+ super();
+ mDialog = null;
+ }
+ // Set the dialog to display
+ public void setDialog(Dialog dialog) {
+ mDialog = dialog;
+ }
+ // Return a Dialog to the DialogFragment.
+ &#64;Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ return mDialog;
+ }
+ }
+ ...
+ /*
+ * Handle results returned to the FragmentActivity
+ * by Google Play services
+ */
+ &#64;Override
+ protected void onActivityResult(
+ int requestCode, int resultCode, Intent data) {
+ // Decide what to do based on the original request code
+ switch (requestCode) {
+ ...
+ case CONNECTION_FAILURE_RESOLUTION_REQUEST :
+ /*
+ * If the result code is Activity.RESULT_OK, try
+ * to connect again
+ */
+ switch (resultCode) {
+ case Activity.RESULT_OK :
+ /*
+ * Try the request again
+ */
+ ...
+ break;
+ }
+ ...
+ }
+ ...
+ }
+ ...
+ private boolean servicesConnected() {
+ // Check that Google Play services is available
+ int resultCode =
+ GooglePlayServicesUtil.
+ isGooglePlayServicesAvailable(this);
+ // If Google Play services is available
+ if (ConnectionResult.SUCCESS == resultCode) {
+ // In debug mode, log the status
+ Log.d("Activity Recognition",
+ "Google Play services is available.");
+ // Continue
+ return true;
+ // Google Play services was not available for some reason
+ } else {
+ // Get the error code
+ int errorCode = connectionResult.getErrorCode();
+ // Get the error dialog from Google Play services
+ Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
+ errorCode,
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+
+ // If Google Play services can provide an error dialog
+ if (errorDialog != null) {
+ // Create a new DialogFragment for the error dialog
+ ErrorDialogFragment errorFragment =
+ new ErrorDialogFragment();
+ // Set the dialog in the DialogFragment
+ errorFragment.setDialog(errorDialog);
+ // Show the error dialog in the DialogFragment
+ errorFragment.show(
+ getSupportFragmentManager(),
+ "Activity Recognition");
+ }
+ return false;
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ Snippets in the following sections call this method to verify that Google Play services is
+ available.
+</p>
+<h3>Send the activity update request</h3>
+<p>
+ Send the update request from an {@link android.app.Activity} or
+ {@link android.support.v4.app.Fragment} that implements the callback methods required by
+ Location Services. Making the request is an asynchronous process that starts when you request
+ a connection to an activity recognition client. When the client is connected, Location Services
+ invokes your implementation of
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)">onConnected()</a></code>.
+ In this method, you can send the update request to Location Services; this request is
+ synchronous. Once you've made the request, you can disconnect the client.
+</p>
+<p>
+ This process is described in the following snippets.
+</p>
+<h4 id="DefineActivity">Define the Activity or Fragment</h4>
+<p>
+ Define an {@link android.support.v4.app.FragmentActivity} or
+ {@link android.support.v4.app.Fragment} that implements the following interfaces:
+</p>
+<dl>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html">ConnectionCallbacks</a></code>
+ </dt>
+ <dd>
+ Specifies methods that Location Services calls when the client is connected or
+ disconnected.
+ </dd>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.OnConnectionFailedListener.html">OnConnectionFailedListener</a></code>
+ </dt>
+ <dd>
+ Specifies a method that Location Services calls if an error occurs while attempting to
+ connect the client.
+ </dd>
+</dl>
+<p>
+ For example:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+}
+</pre>
+<p>
+ Next, define global variables and constants. Define constants for the update interval,
+ add a variable for the activity recognition client, and another for the
+ {@link android.app.PendingIntent} that Location Services uses to send updates to your app:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ // Constants that define the activity detection interval
+ public static final int MILLISECONDS_PER_SECOND = 1000;
+ public static final int DETECTION_INTERVAL_SECONDS = 20;
+ public static final int DETECTION_INTERVAL_MILLISECONDS =
+ MILLISECONDS_PER_SECOND * DETECTION_INTERVAL_SECONDS;
+ ...
+ /*
+ * Store the PendingIntent used to send activity recognition events
+ * back to the app
+ */
+ private PendingIntent mActivityRecognitionPendingIntent;
+ // Store the current activity recognition client
+ private ActivityRecognitionClient mActivityRecognitionClient;
+ ...
+}
+</pre>
+<p>
+ In {@link android.app.Activity#onCreate onCreate()}, instantiate the activity recognition
+ client and the {@link android.app.PendingIntent}:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ &#64;Override
+ onCreate(Bundle savedInstanceState) {
+ ...
+ /*
+ * Instantiate a new activity recognition client. Since the
+ * parent Activity implements the connection listener and
+ * connection failure listener, the constructor uses "this"
+ * to specify the values of those parameters.
+ */
+ mActivityRecognitionClient =
+ new ActivityRecognitionClient(mContext, this, this);
+ /*
+ * Create the PendingIntent that Location Services uses
+ * to send activity recognition updates back to this app.
+ */
+ Intent intent = new Intent(
+ mContext, ActivityRecognitionIntentService.class);
+ /*
+ * Return a PendingIntent that starts the IntentService.
+ */
+ mActivityRecognitionPendingIntent =
+ PendingIntent.getService(mContext, 0, intent,
+ PendingIntent.FLAG_UPDATE_CURRENT);
+ ...
+ }
+ ...
+}
+</pre>
+<h4>Start the request process</h4>
+<p>
+ Define a method that requests activity recognition updates. In the method, request a
+ connection to Location Services. You can call this method from anywhere in your activity; its
+ purpose is to start the chain of method calls for requesting updates.
+</p>
+<p>
+ To guard against race conditions that might arise if your app tries to start another request
+ before the first one finishes, define a boolean flag that tracks the state of the current
+ request. Set the flag to {@code true} when you start a request, and then set it to
+ {@code false} when the request completes.
+</p>
+<p>
+ The following snippet shows how to start a request for updates:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ // Global constants
+ ...
+ // Flag that indicates if a request is underway.
+ private boolean mInProgress;
+ ...
+ &#64;Override
+ onCreate(Bundle savedInstanceState) {
+ ...
+ // Start with the request flag set to false
+ mInProgress = false;
+ ...
+ }
+ ...
+ /**
+ * Request activity recognition updates based on the current
+ * detection interval.
+ *
+ */
+ public void startUpdates() {
+ // Check for Google Play services
+
+ if (!servicesConnected()) {
+ return;
+ }
+ // If a request is not already underway
+ if (!mInProgress) {
+ // Indicate that a request is in progress
+ mInProgress = true;
+ // Request a connection to Location Services
+ mActivityRecognitionClient.connect();
+ //
+ } else {
+ /*
+ * A request is already underway. You can handle
+ * this situation by disconnecting the client,
+ * re-setting the flag, and then re-trying the
+ * request.
+ */
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ Implement
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)">onConnected()</a></code>.
+ In this method, request activity recognition updates from Location Services. When Location
+ Services finishes connecting to the client and calls
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)">onConnected()</a></code>,
+ the update request is called immediately:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ /*
+ * Called by Location Services once the location client is connected.
+ *
+ * Continue by requesting activity updates.
+ */
+ &#64;Override
+ public void onConnected(Bundle dataBundle) {
+ /*
+ * Request activity recognition updates using the preset
+ * detection interval and PendingIntent. This call is
+ * synchronous.
+ */
+ mActivityRecognitionClient.requestActivityUpdates(
+ DETECTION_INTERVAL_MILLISECONDS,
+ mActivityRecognitionPendingIntent);
+ /*
+ * Since the preceding call is synchronous, turn off the
+ * in progress flag and disconnect the client
+ */
+ mInProgress = false;
+ mActivityRecognitionClient.disconnect();
+ }
+ ...
+}
+</pre>
+<h3>Handle disconnections</h3>
+<p>
+ In some cases, Location Services may disconnect from the activity recognition client before
+ you call
+<code><a href="{@docRoot}reference/com/google/android/gms/location/ActivityRecognitionClient.html#disconnect()">disconnect()</a></code>.
+ To handle this situation, implement <code>
+<a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onDisconnected()">onDisconnected()</a></code>.
+ In this method, set the request flag to indicate that a request is not in progress, and
+ delete the client:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ /*
+ * Called by Location Services once the activity recognition
+ * client is disconnected.
+ */
+ &#64;Override
+ public void onDisconnected() {
+ // Turn off the request flag
+ mInProgress = false;
+ // Delete the client
+ mActivityRecognitionClient = null;
+ }
+ ...
+}
+</pre>
+<!-- Handle connection errors -->
+<h3>Handle connection errors</h3>
+<p>
+ Besides handling the normal callbacks from Location Services, you have to provide a callback
+ method that Location Services calls if a connection error occurs. This callback method
+ can re-use the {@link android.support.v4.app.DialogFragment} class that you defined to
+ handle the check for Google Play services. It can also re-use the override you defined
+ for {@link android.support.v4.app.FragmentActivity#onActivityResult onActivityResult()} that
+ receives any Google Play services results that occur when the user interacts with the
+ error dialog. The following snippet shows you a sample implementation of the callback method:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ // Implementation of OnConnectionFailedListener.onConnectionFailed
+ &#64;Override
+ public void onConnectionFailed(ConnectionResult connectionResult) {
+ // Turn off the request flag
+ mInProgress = false;
+ /*
+ * If the error has a resolution, start a Google Play services
+ * activity to resolve it.
+ */
+ if (connectionResult.hasResolution()) {
+ try {
+ connectionResult.startResolutionForResult(
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+ } catch (SendIntentException e) {
+ // Log the error
+ e.printStackTrace();
+ }
+ // If no resolution is available, display an error dialog
+ } else {
+ // Get the error code
+ int errorCode = connectionResult.getErrorCode();
+ // Get the error dialog from Google Play services
+ Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
+ errorCode,
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+ // If Google Play services can provide an error dialog
+ if (errorDialog != null) {
+ // Create a new DialogFragment for the error dialog
+ ErrorDialogFragment errorFragment =
+ new ErrorDialogFragment();
+ // Set the dialog in the DialogFragment
+ errorFragment.setDialog(errorDialog);
+ // Show the error dialog in the DialogFragment
+ errorFragment.show(
+ getSupportFragmentManager(),
+ "Activity Recognition");
+ }
+ }
+ ...
+ }
+ ...
+}
+</pre>
+<!-- Create Intent Service -->
+<h2 id="HandleUpdates">Handle Activity Updates</h2>
+<p>
+ To handle the {@link android.content.Intent} that Location Services sends for each update
+ interval, define an {@link android.app.IntentService} and its required method
+ {@link android.app.IntentService#onHandleIntent onHandleIntent()}. Location Services
+ sends out activity recognition updates as {@link android.content.Intent} objects, using the
+ the {@link android.app.PendingIntent} you provided when you called
+<code><a href="{@docRoot}reference/com/google/android/gms/location/ActivityRecognitionClient.html#requestActivityUpdates(long, android.app.PendingIntent)">requestActivityUpdates()</a></code>.
+ Since you provided an explicit intent for the {@link android.app.PendingIntent}, the only
+ component that receives the intent is the {@link android.app.IntentService} you're defining.
+</p>
+<p>
+ The following snippets demonstrate how to examine the data in an activity recognition
+ update.
+</p>
+<h3>Define an IntentService</h3>
+<p>
+ Start by defining the class and the required method
+ {@link android.app.IntentService#onHandleIntent onHandleIntent()}:
+</p>
+<pre>
+/**
+ * Service that receives ActivityRecognition updates. It receives
+ * updates in the background, even if the main Activity is not visible.
+ */
+public class ActivityRecognitionIntentService extends IntentService {
+ ...
+ /**
+ * Called when a new activity detection update is available.
+ */
+ &#64;Override
+ protected void onHandleIntent(Intent intent) {
+ ...
+ }
+ ...
+}
+</pre>
+<p>
+ Next, examine the data in the intent. From the update, you can get a list of possible activities
+ and the probability of each one. The following snippet shows how to get the most probable
+ activity, the confidence level for the activity (the probability that this is the actual
+ activity), and its type:
+</p>
+<pre>
+public class ActivityRecognitionIntentService extends IntentService {
+ ...
+ &#64;Override
+ protected void onHandleIntent(Intent intent) {
+ ...
+ // If the incoming intent contains an update
+ if (ActivityRecognitionResult.hasResult(intent)) {
+ // Get the update
+ ActivityRecognitionResult result =
+ ActivityRecognitionResult.extractResult(intent);
+ // Get the most probable activity
+ DetectedActivity mostProbableActivity =
+ result.getMostProbableActivity();
+ /*
+ * Get the probability that this activity is the
+ * the user's actual activity
+ */
+ int confidence = mostProbableActivity.getConfidence();
+ /*
+ * Get an integer describing the type of activity
+ */
+ int activityType = mostProbableActivity.getType();
+ String activityName = getNameFromType(activityType);
+ /*
+ * At this point, you have retrieved all the information
+ * for the current update. You can display this
+ * information to the user in a notification, or
+ * send it to an Activity or Service in a broadcast
+ * Intent.
+ */
+ ...
+ } else {
+ /*
+ * This implementation ignores intents that don't contain
+ * an activity update. If you wish, you can report them as
+ * errors.
+ */
+ }
+ ...
+ }
+ ...
+}
+</pre>
+<p>
+ The method {@code getNameFromType()} converts activity types into descriptive
+ strings. In a production app, you should retrieve the strings from resources instead of
+ using fixed values:
+</p>
+<pre>
+public class ActivityRecognitionIntentService extends IntentService {
+ ...
+ /**
+ * Map detected activity types to strings
+ *&#64;param activityType The detected activity type
+ *&#64;return A user-readable name for the type
+ */
+ private String getNameFromType(int activityType) {
+ switch(activityType) {
+ case DetectedActivity.IN_VEHICLE:
+ return "in_vehicle";
+ case DetectedActivity.ON_BICYCLE:
+ return "on_bicycle";
+ case DetectedActivity.ON_FOOT:
+ return "on_foot";
+ case DetectedActivity.STILL:
+ return "still";
+ case DetectedActivity.UNKNOWN:
+ return "unknown";
+ case DetectedActivity.TILTING:
+ return "tilting";
+ }
+ return "unknown";
+ }
+ ...
+}
+</pre>
+<!-- Define IntentService -->
+<h3>Specify the IntentService in the manifest</h3>
+<p>
+ To identify the {@link android.app.IntentService} to the system, add a
+ <code><a href="{@docRoot}guide/topics/manifest/service-element.html">&lt;service&gt;</a></code>
+ element to the app manifest. For example:
+</p>
+<pre>
+&lt;service
+ android:name="com.example.android.location.ActivityRecognitionIntentService"
+ android:label="&#64;string/app_name"
+ android:exported="false"&gt;
+&lt;/service&gt;
+</pre>
+<p>
+ Notice that you don't have to specify intent filters for the service, because it only receives
+ explicit intents. How the incoming activity update intents are created is described in the
+ section <a id="DefineActivity">Define the Activity or Fragment</a>.
+</p>
+<h2 id="RemoveUpdates">Stop Activity Recognition Updates</h2>
+<p>
+ To stop activity recognition updates, use the same pattern you used to request updates,
+ but call <code>
+<a href="{@docRoot}reference/com/google/android/gms/location/ActivityRecognitionClient.html#removeActivityUpdates(android.app.PendingIntent)">removeActivityUpdates()</a></code>
+ instead of <code><a href="{@docRoot}reference/com/google/android/gms/location/ActivityRecognitionClient.html#requestActivityUpdates(long, android.app.PendingIntent)">requestActivityUpdates()</a></code>.
+</p>
+<p>
+<p>
+ Since removing updates uses some of the methods you use to add updates, start by defining
+ request types for the two operations:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ public enum REQUEST_TYPE = {START, STOP}
+ private REQUEST_TYPE mRequestType;
+ ...
+}
+</pre>
+<p>
+ Modify the code that starts activity recognition so that it uses the {@code START}
+ request type:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ public void startUpdates() {
+ // Set the request type to START
+ mRequestType = START;
+ /*
+ * Test for Google Play services after setting the request type.
+ * If Google Play services isn't present, the proper request type
+ * can be restarted.
+ */
+ if (!servicesConnected()) {
+ return;
+ }
+ ...
+ }
+ ...
+ public void onConnected(Bundle dataBundle) {
+ switch (mRequestType) {
+ case START :
+ /*
+ * Request activity recognition updates using the
+ * preset detection interval and PendingIntent.
+ * This call is synchronous.
+ */
+ mActivityRecognitionClient.requestActivityUpdates(
+ DETECTION_INTERVAL_MILLISECONDS,
+ mActivityRecognitionPendingIntent());
+ break;
+ ...
+ }
+ ...
+ }
+ ...
+}
+</pre>
+<h3>Start the process</h3>
+<p>
+ Define a method that requests a stop to activity recognition updates. In the method,
+ set the request type and then request a connection to Location Services. You can call this
+ method from anywhere in your activity; its purpose is to start the chain of method calls that
+ stop activity updates:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ /**
+ * Turn off activity recognition updates
+ *
+ */
+ public void stopUpdates() {
+ // Set the request type to STOP
+ mRequestType = STOP;
+ /*
+ * Test for Google Play services after setting the request type.
+ * If Google Play services isn't present, the request can be
+ * restarted.
+ */
+ if (!servicesConnected()) {
+ return;
+ }
+ // If a request is not already underway
+ if (!mInProgress) {
+ // Indicate that a request is in progress
+ mInProgress = true;
+ // Request a connection to Location Services
+ mActivityRecognitionClient.connect();
+ //
+ } else {
+ /*
+ * A request is already underway. You can handle
+ * this situation by disconnecting the client,
+ * re-setting the flag, and then re-trying the
+ * request.
+ */
+ }
+ ...
+ }
+ ...
+}
+</pre>
+<p>
+ In
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)">onConnected()</a></code>,
+ if the request type is STOP, call
+<code><a href="{@docRoot}reference/com/google/android/gms/location/ActivityRecognitionClient.html#removeActivityUpdates(android.app.PendingIntent)">removeActivityUpdates()</a></code>.
+ Pass the {@link android.app.PendingIntent} you used to start updates as the parameter to
+<code><a href="{@docRoot}reference/com/google/android/gms/location/ActivityRecognitionClient.html#removeActivityUpdates(android.app.PendingIntent)">removeActivityUpdates()</a></code>:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks, OnConnectionFailedListener {
+ ...
+ public void onConnected(Bundle dataBundle) {
+ switch (mRequestType) {
+ ...
+ case STOP :
+ mActivityRecognitionClient.removeActivityUpdates(
+ mActivityRecognitionPendingIntent);
+ break;
+
+ }
+ ...
+ }
+ ...
+}
+</pre>
+<p>
+ You do not have to modify your implementation of
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onDisconnected()">onDisconnected()</a></code>
+ or
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.OnConnectionFailedListener.html#onConnectionFailed(com.google.android.gms.common.ConnectionResult)">onConnectionFailed()</a></code>,
+ because these methods do not depend on the request type.
+</p>
+<p>
+ You now have the basic structure of an app that implements activity recognition. You can combine
+ activity recognition with other location-aware features, such as periodic location updates or
+ geofencing, which are described in other lessons in this class.
+</p>
diff --git a/docs/html/training/location/display-address.jd b/docs/html/training/location/display-address.jd
new file mode 100644
index 0000000..621b082
--- /dev/null
+++ b/docs/html/training/location/display-address.jd
@@ -0,0 +1,280 @@
+page.title=Displaying a Location Address
+
+trainingnavtop=true
+
+@jd:body
+
+
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#DefineTask">Define the Address Lookup Task</a></li>
+ <li><a href="#DisplayResults">Define a Method to Display the Results</a></li>
+ <li><a href="#RunTask">Run the Lookup Task</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li>
+ <a href="{@docRoot}google/play-services/setup.html">Setup Google Play Services SDK</a>
+ </li>
+ <li>
+ <a href="retrieve-current.html">Retrieving the Current Location</a>
+ </li>
+ <li>
+ <a href="receive-location-updates.html">Receiving Location Updates</a>
+ </li>
+</ul>
+<h2>Try it out</h2>
+
+<div class="download-box">
+<a href="http://developer.android.com/shareables/training/LocationUpdates.zip" class="button">Download
+ the sample app</a>
+<p class="filename">LocationUpdates.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>
+ The lessons <a href="retrieve-current.html">Retrieving the Current Location</a> and
+ <a href="receive-location-updates.html">Receiving Location Updates</a> describe how to get the
+ user's current location in the form of a {@link android.location.Location} object that
+ contains latitude and longitude coordinates. Although latitude and longitude are useful for
+ calculating distance or displaying a map position, in many cases the address of the location is
+ more useful.
+</p>
+<p>
+ The Android platform API provides a feature that returns an estimated street addresses for
+ latitude and longitude values. This lesson shows you how to use this address lookup feature.
+</p>
+<p class="note">
+ <strong>Note:</strong> Address lookup requires a backend service that is not included in the
+ core Android framework. If this backend service is not available,
+ {@link android.location.Geocoder#getFromLocation Geocoder.getFromLocation()} returns an empty
+ list. The helper method {@link android.location.Geocoder#isPresent isPresent()}, available
+ in API level 9 and later, checks to see if the backend service is available.
+</p>
+<p>
+ The snippets in the following sections assume that your app has already retrieved the
+ current location and stored it as a {@link android.location.Location} object in the global
+ variable {@code mLocation}.
+</p>
+<!--
+ Define the address lookup task
+-->
+<h2 id="DefineTask">Define the Address Lookup Task</h2>
+<p>
+To get an address for a given latitude and longitude, call
+{@link android.location.Geocoder#getFromLocation Geocoder.getFromLocation()}, which returns a
+list of addresses. The method is synchronous, and may take a long time to do its work, so you
+should call the method from the {@link android.os.AsyncTask#doInBackground
+doInBackground()} method of an {@link android.os.AsyncTask}.
+</p>
+<p>
+While your app is getting the address, display an indeterminate activity
+indicator to show that your app is working in the background. Set the indicator's initial state
+to {@code android:visibility="gone"}, to make it invisible and remove it from the layout
+hierarchy. When you start the address lookup, you set its visibility to "visible".
+</p>
+<p>
+The following snippet shows how to add an indeterminate {@link android.widget.ProgressBar} to
+your layout file:
+</p>
+<pre>
+&lt;ProgressBar
+android:id="&#64;+id/address_progress"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"
+android:layout_centerHorizontal="true"
+android:indeterminate="true"
+android:visibility="gone" /&gt;
+</pre>
+<p>
+To create the background task, define a subclass of {@link android.os.AsyncTask} that calls
+{@link android.location.Geocoder#getFromLocation getFromLocation()} and returns an address.
+Define a {@link android.widget.TextView} object {@code mAddress} to contain the returned
+address, and a {@link android.widget.ProgressBar} object that allows you to control the
+indeterminate activity indicator. For example:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ private TextView mAddress;
+ private ProgressBar mActivityIndicator;
+ ...
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ ...
+ mAddress = (TextView) findViewById(R.id.address);
+ mActivityIndicator =
+ (ProgressBar) findViewById(R.id.address_progress);
+ }
+ ...
+ /**
+ * A subclass of AsyncTask that calls getFromLocation() in the
+ * background. The class definition has these generic types:
+ * Location - A {@link android.location.Location} object containing
+ * the current location.
+ * Void - indicates that progress units are not used
+ * String - An address passed to onPostExecute()
+ */
+ private class GetAddressTask extends
+ AsyncTask&lt;Location, Void, String&gt; {
+ Context mContext;
+ public GetAddressTask(Context context) {
+ super();
+ mContext = context;
+ }
+ ...
+ /**
+ * Get a Geocoder instance, get the latitude and longitude
+ * look up the address, and return it
+ *
+ * &#64;params params One or more Location objects
+ * &#64;return A string containing the address of the current
+ * location, or an empty string if no address can be found,
+ * or an error message
+ */
+ &#64;Override
+ protected String doInBackground(Location... params) {
+ Geocoder geocoder =
+ new Geocoder(mContext, Locale.getDefault());
+ // Get the current location from the input parameter list
+ Location loc = params[0];
+ // Create a list to contain the result address
+ List&lt;Address&gt; addresses = null;
+ try {
+ /*
+ * Return 1 address.
+ */
+ addresses = geocoder.getFromLocation(loc.getLatitude(),
+ loc.getLongitude(), 1);
+ } catch (IOException e1) {
+ Log.e("LocationSampleActivity",
+ "IO Exception in getFromLocation()");
+ e1.printStackTrace();
+ return ("IO Exception trying to get address");
+ } catch (IllegalArgumentException e2) {
+ // Error message to post in the log
+ String errorString = "Illegal arguments " +
+ Double.toString(loc.getLatitude()) +
+ " , " +
+ Double.toString(loc.getLongitude()) +
+ " passed to address service";
+ Log.e("LocationSampleActivity", errorString);
+ e2.printStackTrace();
+ return errorString;
+ }
+ // If the reverse geocode returned an address
+ if (addresses != null &amp;&amp; addresses.size() &gt; 0) {
+ // Get the first address
+ Address address = addresses.get(0);
+ /*
+ * Format the first line of address (if available),
+ * city, and country name.
+ */
+ String addressText = String.format(
+ "&#037;s, &#037;s, &#037;s",
+ // If there's a street address, add it
+ address.getMaxAddressLineIndex() &gt; 0 ?
+ address.getAddressLine(0) : "",
+ // Locality is usually a city
+ address.getLocality(),
+ // The country of the address
+ address.getCountryName());
+ // Return the text
+ return addressText;
+ } else {
+ return "No address found";
+ }
+ }
+ ...
+ }
+ ...
+}
+</pre>
+<p>
+The next section shows you how to display the address in the user interface.
+</p>
+<!-- Define a method to display the address -->
+<h2 id="DisplayResults">Define a Method to Display the Results</h2>
+<p>
+ {@link android.os.AsyncTask#doInBackground doInBackground()} returns the result of the address
+ lookup as a {@link java.lang.String}. This value is passed to
+ {@link android.os.AsyncTask#onPostExecute onPostExecute()}, where you do further processing
+ on the results. Since {@link android.os.AsyncTask#onPostExecute onPostExecute()}
+ runs on the UI thread, it can update the user interface; for example, it can turn off the
+ activity indicator and display the results to the user:
+</p>
+<pre>
+ private class GetAddressTask extends
+ AsyncTask&lt;Location, Void, String&gt; {
+ ...
+ /**
+ * A method that's called once doInBackground() completes. Turn
+ * off the indeterminate activity indicator and set
+ * the text of the UI element that shows the address. If the
+ * lookup failed, display the error message.
+ */
+ &#64;Override
+ protected void onPostExecute(String address) {
+ // Set activity indicator visibility to "gone"
+ mActivityIndicator.setVisibility(View.GONE);
+ // Display the results of the lookup.
+ mAddress.setText(address);
+ }
+ ...
+ }
+</pre>
+<p>
+ The final step is to run the address lookup.
+</p>
+<!-- Get and display the address -->
+<h2 id="RunTask">Run the Lookup Task</h2>
+<p>
+ To get the address, call {@link android.os.AsyncTask#execute execute()}. For example, the
+ following snippet starts the address lookup when the user clicks the "Get Address" button:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ /**
+ * The "Get Address" button in the UI is defined with
+ * android:onClick="getAddress". The method is invoked whenever the
+ * user clicks the button.
+ *
+ * &#64;param v The view object associated with this method,
+ * in this case a Button.
+ */
+ public void getAddress(View v) {
+ // Ensure that a Geocoder services is available
+ if (Build.VERSION.SDK_INT &gt;=
+ Build.VERSION_CODES.GINGERBREAD
+ &amp;&amp;
+ Geocoder.isPresent()) {
+ // Show the activity indicator
+ mActivityIndicator.setVisibility(View.VISIBLE);
+ /*
+ * Reverse geocoding is long-running and synchronous.
+ * Run it on a background thread.
+ * Pass the current location to the background task.
+ * When the task finishes,
+ * onPostExecute() displays the address.
+ */
+ (new GetAddressTask(this)).execute(mLocation);
+ }
+ ...
+ }
+ ...
+}
+</pre>
+<p>
+ The next lesson, <a href="geofencing.html">Creating and Monitoring Geofences</a>, demonstrates
+ how to define locations of interest called <b>geofences</b> and how to use geofence monitoring
+ to detect the user's proximity to a location of interest.
+</p>
diff --git a/docs/html/training/location/geofencing.jd b/docs/html/training/location/geofencing.jd
new file mode 100644
index 0000000..748b6ec
--- /dev/null
+++ b/docs/html/training/location/geofencing.jd
@@ -0,0 +1,1407 @@
+page.title=Creating and Monitoring Geofences
+
+trainingnavtop=true
+@jd:body
+
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#RequestGeofences">Request Geofence Monitoring</a></li>
+ <li><a href="#HandleGeofenceTransitions">Handle Geofence Transitions</a></li>
+ <li><a href="#StopGeofenceMonitoring">Stop Geofence Monitoring</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li>
+ <a href="{@docRoot}google/play-services/setup.html">Setup Google Play Services SDK</a>
+ </li>
+</ul>
+
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="http://developer.android.com/shareables/training/GeofenceDetection.zip" class="button">Download the sample</a>
+ <p class="filename">GeofenceDetection.zip</p>
+</div>
+
+</div>
+</div>
+<p>
+ Geofencing combines awareness of the user's current location with awareness of nearby
+ features, defined as the user's proximity to locations that may be of interest. To mark a
+ location of interest, you specify its latitude and longitude. To adjust the proximity for the
+ location, you add a radius. The latitude, longitude, and radius define a geofence.
+ You can have multiple active geofences at one time.
+</p>
+<p>
+ Location Services treats a geofences as an area rather than as a points and proximity. This
+ allows it to detect when the user enters or exits a geofence. For each geofence, you can ask
+ Location Services to send you entrance events or exit events or both. You can also limit the
+ duration of a geofence by specifying an expiration duration in milliseconds. After the geofence
+ expires, Location Services automatically removes it.
+</p>
+<!--
+ Send geofences to Location Services
+ -->
+<h2 id="RequestGeofences">Request Geofence Monitoring</h2>
+<p>
+ The first step in requesting geofence monitoring is to request the necessary permission.
+ To use geofencing, your app must request
+ {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}. To request this
+ permission, add the following element as a child element of the
+<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code>
+ element:
+</p>
+<pre>
+&lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
+</pre>
+<!-- Check for Google Play services -->
+<h3>Check for Google Play Services</h3>
+<p>
+ Location Services is part of the Google Play services APK. Since it's hard to anticipate the
+ state of the user's device, you should always check that the APK is installed before you attempt
+ to connect to Location Services. To check that the APK is installed, call
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesUtil.html#isGooglePlayServicesAvailable(android.content.Context)">GooglePlayServicesUtil.isGooglePlayServicesAvailable()</a></code>,
+ which returns one of the
+ integer result codes listed in the API reference documentation. If you encounter an error,
+ call
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesUtil.html#getErrorDialog(int, android.app.Activity, int)">GooglePlayServicesUtil.getErrorDialog()</a></code>
+ to retrieve localized dialog that prompts users to take the correct action, then display
+ the dialog in a {@link android.support.v4.app.DialogFragment}. The dialog may allow the
+ user to correct the problem, in which case Google Play services may send a result back to your
+ activity. To handle this result, override the method
+ {@link android.support.v4.app.FragmentActivity#onActivityResult onActivityResult()}
+
+</p>
+<p class="note">
+ <strong>Note:</strong> To make your app compatible with
+ platform version 1.6 and later, the activity that displays the
+ {@link android.support.v4.app.DialogFragment} must subclass
+ {@link android.support.v4.app.FragmentActivity} instead of {@link android.app.Activity}. Using
+ {@link android.support.v4.app.FragmentActivity} also allows you to call
+ {@link android.support.v4.app.FragmentActivity#getSupportFragmentManager
+ getSupportFragmentManager()} to display the {@link android.support.v4.app.DialogFragment}.
+</p>
+<p>
+ Since you usually need to check for Google Play services in more than one place in your code,
+ define a method that encapsulates the check, then call the method before each connection
+ attempt. The following snippet contains all of the code required to check for Google
+ Play services:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ // Global constants
+ /*
+ * Define a request code to send to Google Play services
+ * This code is returned in Activity.onActivityResult
+ */
+ private final static int
+ CONNECTION_FAILURE_RESOLUTION_REQUEST = 9000;
+ ...
+ // Define a DialogFragment that displays the error dialog
+ public static class ErrorDialogFragment extends DialogFragment {
+ // Global field to contain the error dialog
+ private Dialog mDialog;
+ ...
+ // Default constructor. Sets the dialog field to null
+ public ErrorDialogFragment() {
+ super();
+ mDialog = null;
+ }
+ ...
+ // Set the dialog to display
+ public void setDialog(Dialog dialog) {
+ mDialog = dialog;
+ }
+ ...
+ // Return a Dialog to the DialogFragment.
+ &#64;Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ return mDialog;
+ }
+ ...
+ }
+ ...
+ /*
+ * Handle results returned to the FragmentActivity
+ * by Google Play services
+ */
+ &#64;Override
+ protected void onActivityResult(
+ int requestCode, int resultCode, Intent data) {
+ // Decide what to do based on the original request code
+ switch (requestCode) {
+ ...
+ case CONNECTION_FAILURE_RESOLUTION_REQUEST :
+ /*
+ * If the result code is Activity.RESULT_OK, try
+ * to connect again
+ */
+ switch (resultCode) {
+ ...
+ case Activity.RESULT_OK :
+ /*
+ * Try the request again
+ */
+ ...
+ break;
+ }
+ ...
+ }
+ ...
+ }
+ ...
+ private boolean servicesConnected() {
+ // Check that Google Play services is available
+ int resultCode =
+ GooglePlayServicesUtil.
+ isGooglePlayServicesAvailable(this);
+ // If Google Play services is available
+ if (ConnectionResult.SUCCESS == resultCode) {
+ // In debug mode, log the status
+ Log.d("Geofence Detection",
+ "Google Play services is available.");
+ // Continue
+ return true;
+ // Google Play services was not available for some reason
+ } else {
+ // Get the error code
+ int errorCode = connectionResult.getErrorCode();
+ // Get the error dialog from Google Play services
+ Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
+ errorCode,
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+
+ // If Google Play services can provide an error dialog
+ if (errorDialog != null) {
+ // Create a new DialogFragment for the error dialog
+ ErrorDialogFragment errorFragment =
+ new ErrorDialogFragment();
+ // Set the dialog in the DialogFragment
+ errorFragment.setDialog(errorDialog);
+ // Show the error dialog in the DialogFragment
+ errorFragment.show(
+ getSupportFragmentManager(),
+ "Geofence Detection");
+ }
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ Snippets in the following sections call this method to verify that Google Play services is
+ available.
+</p>
+<p>
+ To use geofencing, start by defining the geofences you want to monitor. Although you usually
+ store geofence data in a local database or download it from the network, you need to send
+ a geofence to Location Services as an instance of
+<code><a href="{@docRoot}reference/com/google/android/gms/location/Geofence.html">Geofence</a></code>,
+ which you create with
+<code><a href="{@docRoot}reference/com/google/android/gms/location/Geofence.Builder.html">Geofence.Builder</a></code>.
+ Each
+<code><a href="{@docRoot}reference/com/google/android/gms/location/Geofence.html">Geofence</a></code>
+ object contains the following information:
+</p>
+<dl>
+ <dt>Latitude, longitude, and radius</dt>
+ <dd>
+ Define a circular area for the geofence. Use the latitude and longitude to mark a location
+ of interest, and then use the radius to adjust how close the user needs to approach the
+ location before the geofence is detected. The larger the radius, the more likely the
+ user will trigger a geofence transition alert by approaching the geofence. For example,
+ providing a large radius for a geofencing app that turns on lights in the user's house as
+ the user returns home might cause the lights to go on even if the user is simply passing by.
+ </dd>
+ <dt>Expiration time</dt>
+ <dd>
+ How long the geofence should remain active. Once the expiration time is reached, Location
+ Services deletes the geofence. Most of the time, you should specify an expiration time, but
+ you may want to keep permanent geofences for the user's home or place of work.
+ </dd>
+ <dt>Transition type</dt>
+ <dd>
+ Location Services can detect when the user steps within the radius of the geofence ("entry")
+ and when the user steps outside the radius of the geofence ("exit"), or both.
+ </dd>
+ <dt>Geofence ID</dt>
+ <dd>
+ A string that is stored with the geofence. You should make this unique, so that you can
+ use it to remove a geofence from Location Services tracking.
+ </dd>
+</dl>
+<h3>Define geofence storage</h3>
+<p>
+ A geofencing app needs to read and write geofence data to persistent storage. You shouldn't use
+<code><a href="{@docRoot}reference/com/google/android/gms/location/Geofence.html">Geofence</a></code>
+ objects to do this; instead, use storage techniques such as databases that can store groups of
+ related data.
+</p>
+<p>
+ As an example of storing geofence data, the following snippet defines two classes that use
+ the app's {@link android.content.SharedPreferences} instance for persistent storage. The class
+ {@code SimpleGeofence}, analogous to a database record, stores the
+ data for a single
+<code><a href="{@docRoot}reference/com/google/android/gms/location/Geofence.html">Geofence</a></code>
+ object in a "flattened" form. The class {@code SimpleGeofenceStore}, analogous to a database,
+ reads and writes {@code SimpleGeofence} data to the
+ {@link android.content.SharedPreferences} instance.
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ /**
+ * A single Geofence object, defined by its center and radius.
+ */
+ public class SimpleGeofence {
+ // Instance variables
+ private final String mId;
+ private final double mLatitude;
+ private final double mLongitude;
+ private final float mRadius;
+ private long mExpirationDuration;
+ private int mTransitionType;
+
+ /**
+ * @param geofenceId The Geofence's request ID
+ * @param latitude Latitude of the Geofence's center.
+ * @param longitude Longitude of the Geofence's center.
+ * @param radius Radius of the geofence circle.
+ * @param expiration Geofence expiration duration
+ * @param transition Type of Geofence transition.
+ */
+ public SimpleGeofence(
+ String geofenceId,
+ double latitude,
+ double longitude,
+ float radius,
+ long expiration,
+ int transition) {
+ // Set the instance fields from the constructor
+ this.mId = geofenceId;
+ this.mLatitude = latitude;
+ this.mLongitude = longitude;
+ this.mRadius = radius;
+ this.mExpirationDuration = expiration;
+ this.mTransitionType = transition;
+ }
+ // Instance field getters
+ public String getId() {
+ return mId;
+ }
+ public double getLatitude() {
+ return mLatitude;
+ }
+ public double getLongitude() {
+ return mLongitude;
+ }
+ public float getRadius() {
+ return mRadius;
+ }
+ public long getExpirationDuration() {
+ return mExpirationDuration;
+ }
+ public int getTransitionType() {
+ return mTransitionType;
+ }
+ /**
+ * Creates a Location Services Geofence object from a
+ * SimpleGeofence.
+ *
+ * @return A Geofence object
+ */
+ public Geofence toGeofence() {
+ // Build a new Geofence object
+ return new Geofence.Builder()
+ .setRequestId(getId())
+ .setTransitionTypes(mTransitionType)
+ .setCircularRegion(
+ getLatitude(), getLongitude(), getRadius())
+ .setExpirationDuration(mExpirationDuration)
+ .build();
+ }
+ }
+ ...
+ /**
+ * Storage for geofence values, implemented in SharedPreferences.
+ */
+ public class SimpleGeofenceStore {
+ // Keys for flattened geofences stored in SharedPreferences
+ public static final String KEY_LATITUDE =
+ "com.example.android.geofence.KEY_LATITUDE";
+ public static final String KEY_LONGITUDE =
+ "com.example.android.geofence.KEY_LONGITUDE";
+ public static final String KEY_RADIUS =
+ "com.example.android.geofence.KEY_RADIUS";
+ public static final String KEY_EXPIRATION_DURATION =
+ "com.example.android.geofence.KEY_EXPIRATION_DURATION";
+ public static final String KEY_TRANSITION_TYPE =
+ "com.example.android.geofence.KEY_TRANSITION_TYPE";
+ // The prefix for flattened geofence keys
+ public static final String KEY_PREFIX =
+ "com.example.android.geofence.KEY";
+ /*
+ * Invalid values, used to test geofence storage when
+ * retrieving geofences
+ */
+ public static final long INVALID_LONG_VALUE = -999l;
+ public static final float INVALID_FLOAT_VALUE = -999.0f;
+ public static final int INVALID_INT_VALUE = -999;
+ // The SharedPreferences object in which geofences are stored
+ private final SharedPreferences mPrefs;
+ // The name of the SharedPreferences
+ private static final String SHARED_PREFERENCES =
+ "SharedPreferences";
+ // Create the SharedPreferences storage with private access only
+ public SimpleGeofenceStore(Context context) {
+ mPrefs =
+ context.getSharedPreferences(
+ SHARED_PREFERENCES,
+ Context.MODE_PRIVATE);
+ }
+ /**
+ * Returns a stored geofence by its id, or returns {@code null}
+ * if it's not found.
+ *
+ * @param id The ID of a stored geofence
+ * @return A geofence defined by its center and radius. See
+ */
+ public SimpleGeofence getGeofence(String id) {
+ /*
+ * Get the latitude for the geofence identified by id, or
+ * INVALID_FLOAT_VALUE if it doesn't exist
+ */
+ double lat = mPrefs.getFloat(
+ getGeofenceFieldKey(id, KEY_LATITUDE),
+ INVALID_FLOAT_VALUE);
+ /*
+ * Get the longitude for the geofence identified by id, or
+ * INVALID_FLOAT_VALUE if it doesn't exist
+ */
+ double lng = mPrefs.getFloat(
+ getGeofenceFieldKey(id, KEY_LONGITUDE),
+ INVALID_FLOAT_VALUE);
+ /*
+ * Get the radius for the geofence identified by id, or
+ * INVALID_FLOAT_VALUE if it doesn't exist
+ */
+ float radius = mPrefs.getFloat(
+ getGeofenceFieldKey(id, KEY_RADIUS),
+ INVALID_FLOAT_VALUE);
+ /*
+ * Get the expiration duration for the geofence identified
+ * by id, or INVALID_LONG_VALUE if it doesn't exist
+ */
+ long expirationDuration = mPrefs.getLong(
+ getGeofenceFieldKey(id, KEY_EXPIRATION_DURATION),
+ INVALID_LONG_VALUE);
+ /*
+ * Get the transition type for the geofence identified by
+ * id, or INVALID_INT_VALUE if it doesn't exist
+ */
+ int transitionType = mPrefs.getInt(
+ getGeofenceFieldKey(id, KEY_TRANSITION_TYPE),
+ INVALID_INT_VALUE);
+ // If none of the values is incorrect, return the object
+ if (
+ lat != GeofenceUtils.INVALID_FLOAT_VALUE &amp;&amp;
+ lng != GeofenceUtils.INVALID_FLOAT_VALUE &amp;&amp;
+ radius != GeofenceUtils.INVALID_FLOAT_VALUE &amp;&amp;
+ expirationDuration !=
+ GeofenceUtils.INVALID_LONG_VALUE &amp;&amp;
+ transitionType != GeofenceUtils.INVALID_INT_VALUE) {
+
+ // Return a true Geofence object
+ return new SimpleGeofence(
+ id, lat, lng, radius, expirationDuration,
+ transitionType);
+ // Otherwise, return null.
+ } else {
+ return null;
+ }
+ }
+ /**
+ * Save a geofence.
+ * @param geofence The SimpleGeofence containing the
+ * values you want to save in SharedPreferences
+ */
+ public void setGeofence(String id, SimpleGeofence geofence) {
+ /*
+ * Get a SharedPreferences editor instance. Among other
+ * things, SharedPreferences ensures that updates are atomic
+ * and non-concurrent
+ */
+ Editor editor = mPrefs.edit();
+ // Write the Geofence values to SharedPreferences
+ editor.putFloat(
+ getGeofenceFieldKey(id, KEY_LATITUDE),
+ (float) geofence.getLatitude());
+ editor.putFloat(
+ getGeofenceFieldKey(id, KEY_LONGITUDE),
+ (float) geofence.getLongitude());
+ editor.putFloat(
+ getGeofenceFieldKey(id, KEY_RADIUS),
+ geofence.getRadius());
+ editor.putLong(
+ getGeofenceFieldKey(id, KEY_EXPIRATION_DURATION),
+ geofence.getExpirationDuration());
+ editor.putInt(
+ getGeofenceFieldKey(id, KEY_TRANSITION_TYPE),
+ geofence.getTransitionType());
+ // Commit the changes
+ editor.commit();
+ }
+ public void clearGeofence(String id) {
+ /*
+ * Remove a flattened geofence object from storage by
+ * removing all of its keys
+ */
+ Editor editor = mPrefs.edit();
+ editor.remove(getGeofenceFieldKey(id, KEY_LATITUDE));
+ editor.remove(getGeofenceFieldKey(id, KEY_LONGITUDE));
+ editor.remove(getGeofenceFieldKey(id, KEY_RADIUS));
+ editor.remove(getGeofenceFieldKey(id,
+ KEY_EXPIRATION_DURATION));
+ editor.remove(getGeofenceFieldKey(id, KEY_TRANSITION_TYPE));
+ editor.commit();
+ }
+ /**
+ * Given a Geofence object's ID and the name of a field
+ * (for example, KEY_LATITUDE), return the key name of the
+ * object's values in SharedPreferences.
+ *
+ * @param id The ID of a Geofence object
+ * @param fieldName The field represented by the key
+ * @return The full key name of a value in SharedPreferences
+ */
+ private String getGeofenceFieldKey(String id,
+ String fieldName) {
+ return KEY_PREFIX + "_" + id + "_" + fieldName;
+ }
+ }
+ ...
+}
+</pre>
+<h3>Create Geofence objects</h3>
+<p>
+ The following snippet uses the {@code SimpleGeofence} and {@code SimpleGeofenceStore} classes
+ gets geofence data from the UI, stores it in {@code SimpleGeofence} objects, stores these
+ objects in a {@code SimpleGeofenceStore} object, and then creates
+<code><a href="{@docRoot}reference/com/google/android/gms/location/Geofence.html">Geofence</a></code>
+ objects:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ /*
+ * Use to set an expiration time for a geofence. After this amount
+ * of time Location Services will stop tracking the geofence.
+ */
+ private static final long SECONDS_PER_HOUR = 60;
+ private static final long MILLISECONDS_PER_SECOND = 1000;
+ private static final long GEOFENCE_EXPIRATION_IN_HOURS = 12;
+ private static final long GEOFENCE_EXPIRATION_TIME =
+ GEOFENCE_EXPIRATION_IN_HOURS *
+ SECONDS_PER_HOUR *
+ MILLISECONDS_PER_SECOND;
+ ...
+ /*
+ * Handles to UI views containing geofence data
+ */
+ // Handle to geofence 1 latitude in the UI
+ private EditText mLatitude1;
+ // Handle to geofence 1 longitude in the UI
+ private EditText mLongitude1;
+ // Handle to geofence 1 radius in the UI
+ private EditText mRadius1;
+ // Handle to geofence 2 latitude in the UI
+ private EditText mLatitude2;
+ // Handle to geofence 2 longitude in the UI
+ private EditText mLongitude2;
+ // Handle to geofence 2 radius in the UI
+ private EditText mRadius2;
+ /*
+ * Internal geofence objects for geofence 1 and 2
+ */
+ private SimpleGeofence mUIGeofence1;
+ private SimpleGeofence mUIGeofence2;
+ ...
+ // Internal List of Geofence objects
+ List&lt;Geofence&gt; mGeofenceList;
+ // Persistent storage for geofences
+ private SimpleGeofenceStore mGeofenceStorage;
+ ...
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ ...
+ // Instantiate a new geofence storage area
+ mGeofenceStorage = new SimpleGeofenceStore(this);
+
+ // Instantiate the current List of geofences
+ mCurrentGeofences = new ArrayList&lt;Geofence&gt;();
+ }
+ ...
+ /**
+ * Get the geofence parameters for each geofence from the UI
+ * and add them to a List.
+ */
+ public void createGeofences() {
+ /*
+ * Create an internal object to store the data. Set its
+ * ID to "1". This is a "flattened" object that contains
+ * a set of strings
+ */
+ mUIGeofence1 = new SimpleGeofence(
+ "1",
+ Double.valueOf(mLatitude1.getText().toString()),
+ Double.valueOf(mLongitude1.getText().toString()),
+ Float.valueOf(mRadius1.getText().toString()),
+ GEOFENCE_EXPIRATION_TIME,
+ // This geofence records only entry transitions
+ Geofence.GEOFENCE_TRANSITION_ENTER);
+ // Store this flat version
+ mGeofenceStorage.setGeofence("1", mUIGeofence1);
+ // Create another internal object. Set its ID to "2"
+ mUIGeofence2 = new SimpleGeofence(
+ "2",
+ Double.valueOf(mLatitude2.getText().toString()),
+ Double.valueOf(mLongitude2.getText().toString()),
+ Float.valueOf(mRadius2.getText().toString()),
+ GEOFENCE_EXPIRATION_TIME,
+ // This geofence records both entry and exit transitions
+ Geofence.GEOFENCE_TRANSITION_ENTER |
+ Geofence.GEOFENCE_TRANSITION_EXIT);
+ // Store this flat version
+ mGeofenceStorage.setGeofence(2, mUIGeofence2);
+ mGeofenceList.add(mUIGeofence1.toGeofence());
+ mGeofenceList.add(mUIGeofence2.toGeofence());
+ }
+ ...
+}
+</pre>
+<p>
+ In addition to the {@link java.util.List} of
+<code><a href="{@docRoot}reference/com/google/android/gms/location/Geofence.html">Geofence</a></code>
+ objects you want to monitor, you need to provide Location Services with the
+ {@link android.content.Intent} that it sends to your app when it detects geofence
+ transitions.
+<h4>Define a Intent for geofence transitions</h4>
+<p>
+ The {@link android.content.Intent} sent from Location Services can trigger various actions in
+ your app, but you should <i>not</i> have it start an activity or fragment, because components
+ should only become visible in response to a user action. In many cases, an
+ {@link android.app.IntentService} is a good way to handle the intent. An
+ {@link android.app.IntentService} can post a notification, do long-running background work,
+ send intents to other services, or send a broadcast intent. The following snippet shows how
+ how to define a {@link android.app.PendingIntent} that starts an
+ {@link android.app.IntentService}:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ /*
+ * Create a PendingIntent that triggers an IntentService in your
+ * app when a geofence transition occurs.
+ */
+ private PendingIntent getTransitionPendingIntent() {
+ // Create an explicit Intent
+ Intent intent = new Intent(this,
+ ReceiveTransitionsIntentService.class);
+ /*
+ * Return the PendingIntent
+ */
+ return PendingIntent.getService(
+ this,
+ 0,
+ intent,
+ PendingIntent.FLAG_UPDATE_CURRENT);
+ }
+ ...
+}
+</pre>
+<p>
+ Now you have all the code you need to send a request to monitor geofences to Location
+ Services.
+</p>
+<!-- Send the monitoring request -->
+<h3 id="requestmonitoring">Send the monitoring request</h3>
+<p>
+ Sending the monitoring request requires two asynchronous operations. The first operation gets a
+ location client for the request, and the second makes the request using the client. In both
+ cases, Location Services invokes a callback method when it finishes the operation. The best way
+ to handle these operations is to chain together the method calls. The following snippets
+ demonstrate how to set up an activity, define the methods, and call them in the proper order.
+</p>
+<p>
+ First, modify the activity's class definition to implement the necessary callback interfaces.
+ Add the following interfaces:
+</p>
+<dl>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html">ConnectionCallbacks</a></code>
+ </dt>
+ <dd>
+ Specifies methods that Location Services calls when a location client is connected or
+ disconnected.
+ </dd>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.OnConnectionFailedListener.html">OnConnectionFailedListener</a></code>
+ </dt>
+ <dd>
+ Specifies a method that Location Services calls if an error occurs while attempting to
+ connect the location client.
+ </dd>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.OnAddGeofencesResultListener.html">OnAddGeofencesResultListener</a></code>
+ </dt>
+ <dd>
+ Specifies a method that Location Services calls once it has added the geofences.
+ </dd>
+</dl>
+<p>
+ For example:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+}
+</pre>
+<h4>Start the request process</h4>
+<p>
+ Next, define a method that starts the request process by connecting to Location Services.
+ Mark this as a request to add a geofence by setting a global variable. This allows you to
+ use the callback
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)">ConnectionCallbacks.onConnected()</a></code>
+ to add geofences and to remove them, as described in succeeding sections.
+</p>
+<p>
+<p>
+ To guard against race conditions that might arise if your app tries to start another request
+ before the first one finishes, define a boolean flag that tracks the state of the current
+ request:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ // Holds the location client
+ private LocationClient mLocationClient;
+ // Stores the PendingIntent used to request geofence monitoring
+ private PendingIntent mGeofenceRequestIntent;
+ // Defines the allowable request types.
+ public enum REQUEST_TYPE = {ADD}
+ private REQUEST_TYPE mRequestType;
+ // Flag that indicates if a request is underway.
+ private boolean mInProgress;
+ ...
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ ...
+ // Start with the request flag set to false
+ mInProgress = false;
+ ...
+ }
+ ...
+ /**
+ * Start a request for geofence monitoring by calling
+ * LocationClient.connect().
+ */
+ public void addGeofences() {
+ // Start a request to add geofences
+ mRequestType = ADD;
+ /*
+ * Test for Google Play services after setting the request type.
+ * If Google Play services isn't present, the proper request
+ * can be restarted.
+ */
+ if (!servicesConnected()) {
+ return;
+ }
+ /*
+ * Create a new location client object. Since the current
+ * activity class implements ConnectionCallbacks and
+ * OnConnectionFailedListener, pass the current activity object
+ * as the listener for both parameters
+ */
+ mLocationClient = new LocationClient(this, this, this)
+ // If a request is not already underway
+ if (!mInProgress) {
+ // Indicate that a request is underway
+ mInProgress = true;
+ // Request a connection from the client to Location Services
+ mLocationClient.connect();
+ } else {
+ /*
+ * A request is already underway. You can handle
+ * this situation by disconnecting the client,
+ * re-setting the flag, and then re-trying the
+ * request.
+ */
+ }
+ }
+ ...
+}
+</pre>
+<h4>Send a request to add the geofences</h4>
+<p>
+ In your implementation of
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)">ConnectionCallbacks.onConnected()</a></code>,
+ call
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#addGeofences(java.util.List<com.google.android.gms.location.Geofence>, android.app.PendingIntent, com.google.android.gms.location.LocationClient.OnAddGeofencesResultListener)">LocationClient.addGeofences()</a></code>.
+ Notice that if the connection fails,
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)">onConnected()</a></code>
+ isn't called, and the request stops.
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ /*
+ * Provide the implementation of ConnectionCallbacks.onConnected()
+ * Once the connection is available, send a request to add the
+ * Geofences
+ */
+ &#64;Override
+ private void onConnected(Bundle dataBundle) {
+ ...
+ switch (mRequestType) {
+ case ADD :
+ // Get the PendingIntent for the request
+ mTransitionPendingIntent =
+ getTransitionPendingIntent();
+ // Send a request to add the current geofences
+ mLocationClient.addGeofences(
+ mCurrentGeofences, pendingIntent, this);
+ ...
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ Notice that
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#addGeofences(java.util.List<com.google.android.gms.location.Geofence>, android.app.PendingIntent, com.google.android.gms.location.LocationClient.OnAddGeofencesResultListener)">addGeofences()</a></code>
+ returns immediately, but the status of the request is indeterminate until Location Services
+ calls
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.OnAddGeofencesResultListener.html#onAddGeofencesResult(int, java.lang.String[])">onAddGeofencesResult()</a></code>
+ Once this method is called, you can determine if the request was successful or not.
+</p>
+<h4>Check the result returned by Location Services</h4>
+<p>
+ When Location Services invokes your implementation of the callback method
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.OnAddGeofencesResultListener.html#onAddGeofencesResult(int, java.lang.String[])">onAddGeofencesResult()</a></code>,
+ indicating that the request is complete, examine the incoming status code. If the request
+ was successful, the geofences you requested are active. If the request was unsuccessful,
+ the geofences aren't active, and you need to re-try the request or report an error. For example:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ /*
+ * Provide the implementation of
+ * OnAddGeofencesResultListener.onAddGeofencesResult.
+ * Handle the result of adding the geofences
+ *
+ */
+ &#64;Override
+ public void onAddGeofencesResult(
+ int statusCode, String[] geofenceRequestIds) {
+ // If adding the geofences was successful
+ if (LocationStatusCodes.SUCCESS == statusCode) {
+ /*
+ * Handle successful addition of geofences here.
+ * You can send out a broadcast intent or update the UI.
+ * geofences into the Intent's extended data.
+ */
+ } else {
+ // If adding the geofences failed
+ /*
+ * Report errors here.
+ * You can log the error using Log.e() or update
+ * the UI.
+ */
+ }
+ // Turn off the in progress flag and disconnect the client
+ mInProgress = false;
+ mLocationClient.disconnect();
+ }
+ ...
+}
+</pre>
+<!-- Handle disconnections -->
+<h3>Handle disconnections</h3>
+<p>
+ In some cases, Location Services may disconnect from the activity recognition client before
+ you call
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#disconnect()">disconnect()</a></code>.
+ To handle this situation, implement <code>
+<a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onDisconnected()">onDisconnected()</a></code>.
+ In this method, set the request flag to indicate that a request is not in progress, and
+ delete the client:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ /*
+ * Implement ConnectionCallbacks.onDisconnected()
+ * Called by Location Services once the location client is
+ * disconnected.
+ */
+ &#64;Override
+ public void onDisconnected() {
+ // Turn off the request flag
+ mInProgress = false;
+ // Destroy the current location client
+ mLocationClient = null;
+ }
+ ...
+}
+</pre>
+<!-- Handle connection errors -->
+<h3>Handle connection errors</h3>
+<p>
+ Besides handling the normal callbacks from Location Services, you have to provide a callback
+ method that Location Services calls if a connection error occurs. This callback method
+ can re-use the {@link android.support.v4.app.DialogFragment} class that you defined to
+ handle the check for Google Play services. It can also re-use the override you defined
+ for {@link android.support.v4.app.FragmentActivity#onActivityResult onActivityResult()} that
+ receives any Google Play services results that occur when the user interacts with the
+ error dialog. The following snippet shows you a sample implementation of the callback method:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ // Implementation of OnConnectionFailedListener.onConnectionFailed
+ &#64;Override
+ public void onConnectionFailed(ConnectionResult connectionResult) {
+ // Turn off the request flag
+ mInProgress = false;
+ /*
+ * If the error has a resolution, start a Google Play services
+ * activity to resolve it.
+ */
+ if (connectionResult.hasResolution()) {
+ try {
+ connectionResult.startResolutionForResult(
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+ } catch (SendIntentException e) {
+ // Log the error
+ e.printStackTrace();
+ }
+ // If no resolution is available, display an error dialog
+ } else {
+ // Get the error code
+ int errorCode = connectionResult.getErrorCode();
+ // Get the error dialog from Google Play services
+ Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
+ errorCode,
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+ // If Google Play services can provide an error dialog
+ if (errorDialog != null) {
+ // Create a new DialogFragment for the error dialog
+ ErrorDialogFragment errorFragment =
+ new ErrorDialogFragment();
+ // Set the dialog in the DialogFragment
+ errorFragment.setDialog(errorDialog);
+ // Show the error dialog in the DialogFragment
+ errorFragment.show(
+ getSupportFragmentManager(),
+ "Geofence Detection");
+ }
+ }
+ }
+ ...
+}
+</pre>
+<!--
+ Handle Geofence Transitions
+ -->
+<h2 id="HandleGeofenceTransitions">Handle Geofence Transitions</h2>
+<p>
+ When Location Services detects that the user has entered or exited a geofence, it
+ sends out the {@link android.content.Intent} contained in the {@link android.app.PendingIntent}
+ you included in the request to add geofences. This {@link android.content.Intent} is
+</p>
+<h3>Define an IntentService</h3>
+<p>
+ The following snippet shows how to define an {@link android.app.IntentService} that posts a
+ notification when a geofence transition occurs. When the user clicks the notification, the
+ app's main activity appears:
+</p>
+<pre>
+public class ReceiveTransitionsIntentService extends IntentService {
+ ...
+ /**
+ * Sets an identifier for the service
+ */
+ public ReceiveTransitionsIntentService() {
+ super("ReceiveTransitionsIntentService");
+ }
+ /**
+ * Handles incoming intents
+ *&#64;param intent The Intent sent by Location Services. This
+ * Intent is provided
+ * to Location Services (inside a PendingIntent) when you call
+ * addGeofences()
+ */
+ &#64;Override
+ protected void onHandleIntent(Intent intent) {
+ // First check for errors
+ if (LocationClient.hasError(intent)) {
+ // Get the error code with a static method
+ int errorCode = LocationClient.getErrorCode(intent);
+ // Log the error
+ Log.e("ReceiveTransitionsIntentService",
+ "Location Services error: " +
+ Integer.toString(errorCode));
+ /*
+ * You can also send the error code to an Activity or
+ * Fragment with a broadcast Intent
+ */
+ /*
+ * If there's no error, get the transition type and the IDs
+ * of the geofence or geofences that triggered the transition
+ */
+ } else {
+ // Get the type of transition (entry or exit)
+ int transitionType =
+ LocationClient.getGeofenceTransition(intent);
+ // Test that a valid transition was reported
+ if (
+ (transitionType == Geofence.GEOFENCE_TRANSITION_ENTER)
+ ||
+ (transitionType == Geofence.GEOFENCE_TRANSITION_EXIT)
+ ) {
+ List &lt;Geofence&gt; triggerList =
+ getTriggeringGeofences(intent);
+
+ String[] triggerIds = new String[geofenceList.size()];
+
+ for (int i = 0; i &lt; triggerIds.length; i++) {
+ // Store the Id of each geofence
+ triggerIds[i] = triggerList.get(i).getRequestId();
+ }
+ /*
+ * At this point, you can store the IDs for further use
+ * display them, or display the details associated with
+ * them.
+ */
+ }
+ // An invalid transition was reported
+ } else {
+ Log.e("ReceiveTransitionsIntentService",
+ "Geofence transition error: " +
+ Integer.toString()transitionType));
+ }
+ }
+ ...
+}
+</pre>
+<!-- Specify the IntentService in the manifest -->
+<h3>Specify the IntentService in the manifest</h3>
+<p>
+ To identify the {@link android.app.IntentService} to the system, add a
+ <code><a href="{@docRoot}guide/topics/manifest/service-element.html">&lt;service&gt;</a></code>
+ element to the app manifest. For example:
+</p>
+<pre>
+&lt;service
+ android:name="com.example.android.location.ReceiveTransitionsIntentService"
+ android:label="&#64;string/app_name"
+ android:exported="false"&gt;
+&lt;/service&gt;
+</pre>
+<p>
+ Notice that you don't have to specify intent filters for the service, because it only receives
+ explicit intents. How the incoming geofence transition intents are created is described in the
+ section <a href="#requestmonitoring">Send the monitoring request</a>.
+</p>
+<!--
+ Remove Geofences
+ -->
+<h2 id="StopGeofenceMonitoring">Stop Geofence Monitoring</h2>
+<p>
+ To stop geofence monitoring, you remove the geofences themselves. You can remove a specific
+ set of geofences or all the geofences associated with a {@link android.app.PendingIntent}. The
+ procedure is similar to adding geofences. The first operation gets a location
+ client for the removal request, and the second makes the request using the client.
+</p>
+<p>
+ The callback methods that Location Services invokes when it has finished removing geofences
+ are defined in the interface
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.OnRemoveGeofencesResultListener.html">LocationClient.OnRemoveGeofencesResultListener</a></code>. Declare
+ this interface as part of your class definition, and then add definitions for its two methods:
+</p>
+<dl>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.OnRemoveGeofencesResultListener.html#onRemoveGeofencesByPendingIntentResult(int, android.app.PendingIntent)">onRemoveGeofencesByPendingIntentResult()</a></code>
+ </dt>
+ <dd>
+ Callback invoked when Location Services finishes a request to remove all geofences made
+ by the method
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#removeGeofences(android.app.PendingIntent, com.google.android.gms.location.LocationClient.OnRemoveGeofencesResultListener)">removeGeofences(PendingIntent, LocationClient.OnRemoveGeofencesResultListener)</a></code>.
+ </dd>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.OnRemoveGeofencesResultListener.html#onRemoveGeofencesByRequestIdsResult(int, java.lang.String[])">onRemoveGeofencesByRequestIdsResult(List&lt;String&gt;, LocationClient.OnRemoveGeofencesResultListener)</a></code>
+ </dt>
+ <dd>
+ Callback invoked when Location Services finished a request to remove a set of geofences,
+ specified by their geofence IDs, by the method
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#removeGeofences(java.util.List<java.lang.String>, com.google.android.gms.location.LocationClient.OnRemoveGeofencesResultListener)">removeGeofences(List&lt;String&gt;, LocationClient.OnRemoveGeofencesResultListener)</a></code>.
+ </dd>
+</dl>
+<p>
+ Examples of implementing these methods are shown in the next snippets.
+</p>
+<h3>Remove all geofences</h3>
+<p>
+ Since removing geofences uses some of the methods you use to add geofences, start by defining
+ another request type:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ // Enum type for controlling the type of removal requested
+ public enum REQUEST_TYPE = {ADD, REMOVE_INTENT}
+ ...
+}
+</pre>
+<p>
+ Start the removal request by getting a connection to Location Services. If the connection fails,
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html#onConnected(android.os.Bundle)">onConnected()</a></code> isn't called,
+ and the request stops. The following snippet shows how to start the request:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ /**
+ * Start a request to remove geofences by calling
+ * LocationClient.connect()
+ */
+ public void removeGeofences(PendingIntent requestIntent) {
+ // Record the type of removal request
+ mRequestType = REMOVE_INTENT;
+ /*
+ * Test for Google Play services after setting the request type.
+ * If Google Play services isn't present, the request can be
+ * restarted.
+ */
+ if (!servicesConnected()) {
+ return;
+ }
+ // Store the PendingIntent
+ mGeofenceRequestIntent = requestIntent;
+ /*
+ * Create a new location client object. Since the current
+ * activity class implements ConnectionCallbacks and
+ * OnConnectionFailedListener, pass the current activity object
+ * as the listener for both parameters
+ */
+ mLocationClient = new LocationClient(this, this, this);
+ // If a request is not already underway
+ if (!mInProgress) {
+ // Indicate that a request is underway
+ mInProgress = true;
+ // Request a connection from the client to Location Services
+ mLocationClient.connect();
+ } else {
+ /*
+ * A request is already underway. You can handle
+ * this situation by disconnecting the client,
+ * re-setting the flag, and then re-trying the
+ * request.
+ */
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ When Location Services invokes the callback method indicating that the connection is open,
+ make the request to remove all geofences. Disconnect the client after making the request.
+ For example:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ /**
+ * Once the connection is available, send a request to remove the
+ * Geofences. The method signature used depends on which type of
+ * remove request was originally received.
+ */
+ private void onConnected(Bundle dataBundle) {
+ /*
+ * Choose what to do based on the request type set in
+ * removeGeofences
+ */
+ switch (mRequestType) {
+ ...
+ case REMOVE_INTENT :
+ mLocationClient.removeGeofences(
+ mGeofenceRequestIntent, this);
+ break;
+ ...
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ Although the call to
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#removeGeofences(android.app.PendingIntent, com.google.android.gms.location.LocationClient.OnRemoveGeofencesResultListener)">removeGeofences(PendingIntent, LocationClient.OnRemoveGeofencesResultListener)</a></code> Services calls
+ returns immediately, the result of the removal request is indeterminate until Location Services
+ calls
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.OnRemoveGeofencesResultListener.html#onRemoveGeofencesByPendingIntentResult(int, android.app.PendingIntent)">onRemoveGeofencesByPendingIntentResult()</a></code>.
+ The following snippet shows how to define this method:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ /**
+ * When the request to remove geofences by PendingIntent returns,
+ * handle the result.
+ *
+ *&#64;param statusCode the code returned by Location Services
+ *&#64;param requestIntent The Intent used to request the removal.
+ */
+ &#64;Override
+ public void onRemoveGeofencesByPendingIntentResult(int statusCode,
+ PendingIntent requestIntent) {
+ // If removing the geofences was successful
+ if (statusCode == LocationStatusCodes.SUCCESS) {
+ /*
+ * Handle successful removal of geofences here.
+ * You can send out a broadcast intent or update the UI.
+ * geofences into the Intent's extended data.
+ */
+ } else {
+ // If adding the geocodes failed
+ /*
+ * Report errors here.
+ * You can log the error using Log.e() or update
+ * the UI.
+ */
+ }
+ /*
+ * Disconnect the location client regardless of the
+ * request status, and indicate that a request is no
+ * longer in progress
+ */
+ mInProgress = false;
+ mLocationClient.disconnect();
+ }
+ ...
+}
+</pre>
+<h3>Remove individual geofences</h3>
+<p>
+ The procedure for removing an individual geofence or set of geofences is similar to the
+ removal of all geofences. To specify the geofences you want remove, add their geofence ID
+ values to a {@link java.util.List} of String objects. Pass this {@link java.util.List} to a
+ different definition of {@code removeGeofences} with the appropriate signature. This method
+ then starts the removal process.
+</p>
+<p>
+ Start by adding a request type for removing geofences by a list, and also add a global variable
+ for storing the list of geofences:
+</p>
+<pre>
+ ...
+ // Enum type for controlling the type of removal requested
+ public enum REQUEST_TYPE = {ADD, REMOVE_INTENT, REMOVE_LIST}
+ // Store the list of geofence Ids to remove
+ String&lt;List&gt; mGeofencesToRemove;
+</pre>
+<p>
+ Next, define a list of geofences you want to remove. For example, this snippet removes the
+<code><a href="{@docRoot}reference/com/google/android/gms/location/Geofence.html">Geofence</a></code>
+ defined by the geofence ID "1":
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ List&lt;String&gt; listOfGeofences =
+ Collections.singletonList("1");
+ removeGeofences(listOfGeofences);
+ ...
+}
+</pre>
+<p>
+ The following snippet defines the {@code removeGeofences()} method:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ /**
+ * Start a request to remove monitoring by
+ * calling LocationClient.connect()
+ *
+ */
+ public void removeGeofences(List&lt;String&gt; geofenceIds) {
+ // If Google Play services is unavailable, exit
+ // Record the type of removal request
+ mRequestType = REMOVE_LIST;
+ /*
+ * Test for Google Play services after setting the request type.
+ * If Google Play services isn't present, the request can be
+ * restarted.
+ */
+ if (!servicesConnected()) {
+ return;
+ }
+ // Store the list of geofences to remove
+ mGeofencesToRemove = geofenceIds;
+ /*
+ * Create a new location client object. Since the current
+ * activity class implements ConnectionCallbacks and
+ * OnConnectionFailedListener, pass the current activity object
+ * as the listener for both parameters
+ */
+ mLocationClient = new LocationClient(this, this, this);
+ // If a request is not already underway
+ if (!mInProgress) {
+ // Indicate that a request is underway
+ mInProgress = true;
+ // Request a connection from the client to Location Services
+ mLocationClient.connect();
+ } else {
+ /*
+ * A request is already underway. You can handle
+ * this situation by disconnecting the client,
+ * re-setting the flag, and then re-trying the
+ * request.
+ */
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ When Location Services invokes the callback method indicating that the connection is open,
+ make the request to remove the list of geofences. Disconnect the client after making the request.
+ For example:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ private void onConnected(Bundle dataBundle) {
+ ...
+ switch (mRequestType) {
+ ...
+ // If removeGeofencesById was called
+ case REMOVE_LIST :
+ mLocationClient.removeGeofences(
+ mGeofencesToRemove, this);
+ break;
+ ...
+ }
+ ...
+ }
+ ...
+}
+</pre>
+<p>
+ Define an implementation of
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.OnRemoveGeofencesResultListener.html#onRemoveGeofencesByRequestIdsResult(int, java.lang.String[])">onRemoveGeofencesByRequestIdsResult()</a></code>.
+ Location Services invokes this callback method to indicate that the request to remove a list of
+ geofences is complete. In this method, examine the incoming status code and take the
+ appropriate action:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ ConnectionCallbacks,
+ OnConnectionFailedListener,
+ OnAddGeofencesResultListener {
+ ...
+ /**
+ * When the request to remove geofences by IDs returns, handle the
+ * result.
+ *
+ * &#64;param statusCode The code returned by Location Services
+ * &#64;param geofenceRequestIds The IDs removed
+ */
+ &#64;Override
+ public void onRemoveGeofencesByRequestIdsResult(
+ int statusCode, String[] geofenceRequestIds) {
+ // If removing the geocodes was successful
+ if (LocationStatusCodes.SUCCESS == statusCode) {
+ /*
+ * Handle successful removal of geofences here.
+ * You can send out a broadcast intent or update the UI.
+ * geofences into the Intent's extended data.
+ */
+ } else {
+ // If removing the geofences failed
+ /*
+ * Report errors here.
+ * You can log the error using Log.e() or update
+ * the UI.
+ */
+ }
+ // Indicate that a request is no longer in progress
+ mInProgress = false;
+ // Disconnect the location client
+ mLocationClient.disconnect();
+ }
+ ...
+}
+</pre>
+<p>
+ You can combine geofencing with other location-aware features, such as periodic location updates
+ or activity recognition, which are described in other lessons in this class.
+</p>
+<p>
+ The next lesson,
+ <a href="activity-recognition.html">Recognizing the User's Current Activity</a>, shows you how
+ to request and receive activity updates. At regular intervals, Location Services can send you
+ information about the user's current physical activity. Based on this information, you can
+ change your app's behavior; for example, you can switch to a longer update interval if you
+ detect that the user is walking instead of driving.
+</p>
diff --git a/docs/html/training/location/index.jd b/docs/html/training/location/index.jd
new file mode 100644
index 0000000..5ebbb84
--- /dev/null
+++ b/docs/html/training/location/index.jd
@@ -0,0 +1,88 @@
+page.title=Making Your App Location-Aware
+page.tags="location","geofence", "geofencing", "activity recognition", "activity detection", "gps"
+
+trainingnavtop=true
+startpage=true
+
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<!-- Required platform, tools, add-ons, devices, knowledge, etc. -->
+<h2>Dependencies and prerequisites</h2>
+<ul>
+ <li>Google Play services client library (latest version)</li>
+ <li>Android version 2.2 (API level 8) or later</li>
+</ul>
+
+<!-- related docs (NOT javadocs) -->
+<h2>You should also read</h2>
+<ul>
+ <li>
+ <a href="{@docRoot}google/play-services/setup.html">Setup Google Play Services SDK</a>
+ </li>
+</ul>
+
+</div>
+</div>
+
+<p>
+ One of the unique features of mobile applications is location awareness. Mobile users bring
+ their devices with them everywhere, and adding location awareness to your app offers users a
+ more contextual experience. The new Location Services API available in Google Play services
+ facilitates adding location awareness to your app with automated location tracking,
+ geofencing, and activity recognition. This API adds significant advantages over the plaform's
+ location API.
+</p>
+<p>
+ This class shows you how to use Location Services in your app to get the current location,
+ get periodic location updates, look up addresses, create and monitor geofences, and
+ detect user activities. The class includes sample apps and code snippets that you can use as a
+ starting point for adding location awareness to your own app.
+</p>
+<p class="note">
+ <strong>Note:</strong> Since this class is based on the Google Play services client library,
+ make sure you install the latest version before using the sample apps or code snippets. To learn
+ how to set up the client library with the latest version, see
+ <a href="{@docRoot}google/play-services/setup.html">Setup</a> in the Google Play services guide.
+</p>
+<h2>Lessons</h2>
+<dl>
+ <dt>
+ <b><a href="retrieve-current.html">Retrieving the Current Location</a></b>
+ </dt>
+ <dd>
+ Learn how to retrieve the user's current location.
+ </dd>
+ <dt>
+ <b><a href="receive-location-updates.html">Receiving Location Updates</a></b>
+ </dt>
+ <dd>
+ Learn how to request and receive periodic location updates.
+ </dd>
+ <dt>
+ <b><a href="display-address.html">Displaying a Location Address</a></b>
+ </dt>
+ <dd>
+ Learn how to convert a location's latitude and longitude into an address (reverse
+ geocoding).
+ </dd>
+ <dt>
+ <b>
+ <a href="geofencing.html">Creating and Monitoring Geofences</a>
+ </b>
+ </dt>
+ <dd>
+ Learn how to define one or more geographic areas as locations of interest, called geofences,
+ and detect when the user is close to or inside a geofence.
+ </dd>
+ <dt>
+ <b><a href="activity-recognition.html">Recognizing the User's Current Activity</a></b>
+ </dt>
+ <dd>
+ Learn how to recognize the user's current activity, such as walking, bicycling,
+ or driving a car, and how to use this information to modify your app's location strategy.
+ </dd>
+</dl>
diff --git a/docs/html/training/location/receive-location-updates.jd b/docs/html/training/location/receive-location-updates.jd
new file mode 100644
index 0000000..eb4ffa3
--- /dev/null
+++ b/docs/html/training/location/receive-location-updates.jd
@@ -0,0 +1,590 @@
+page.title=Receiving Location Updates
+trainingnavtop=true
+@jd:body
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#Permissions">Request Location Permission</a></li>
+ <li><a href="#PlayServices">Check for Google Play Services</a></li>
+ <li><a href="#DefineCallbacks">Define Location Services Callbacks</a></li>
+ <li><a href="#UpdateParameters">Specify Update Parameters</a></li>
+ <li><a href="#StartUpdates">Start Location Updates</a></li>
+ <li><a href="#StopUpdates">Stop Location Updates</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li>
+ <a href="{@docRoot}google/play-services/setup.html">Setup Google Play Services SDK</a>
+ </li>
+ <li>
+ <a href="retrieve-current.html">Retrieving the Current Location</a>
+ </li>
+ </ul>
+
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="http://developer.android.com/shareables/training/LocationUpdates.zip" class="button">Download the sample</a>
+ <p class="filename">LocationUpdates.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>
+ If your app does navigation or tracking, you probably want to get the user's
+ location at regular intervals. While you can do this with
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#getLastLocation()">LocationClient.getLastLocation()</a></code>,
+ a more direct approach is to request periodic updates from Location Services. In
+ response, Location Services automatically updates your app with the best available location,
+ based on the currently-available location providers such as WiFi and GPS.
+</p>
+<p>
+ To get periodic location updates from Location Services, you send a request using a location
+ client. Depending on the form of the request, Location Services either invokes a callback
+ method and passes in a {@link android.location.Location} object, or issues an
+ {@link android.content.Intent} that contains the location in its extended data. The accuracy and
+ frequency of the updates are affected by the location permissions you've requested and the
+ parameters you pass to Location Services with the request.
+</p>
+<!-- Request permission -->
+<h2 id="Permissions">Specify App Permissions</h2>
+<p>
+ Apps that use Location Services must request location permissions. Android has two location
+ permissions, {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION}
+ and {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}. The
+ permission you choose affects the accuracy of the location updates you receive.
+ For example, If you request only coarse location permission, Location Services obfuscates the
+ updated location to an accuracy that's roughly equivalent to a city block.
+</p>
+<p>
+ Requesting {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION} implies
+ a request for {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION}.
+</p>
+<p>
+ For example, to add the coarse location permission to your manifest, insert the following as a
+ child element of
+ the
+<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code>
+ element:
+</p>
+<pre>
+&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt;
+</pre>
+<!-- Check for Google Play services -->
+<h2 id="PlayServices">Check for Google Play Services</h2>
+<p>
+ Location Services is part of the Google Play services APK. Since it's hard to anticipate the
+ state of the user's device, you should always check that the APK is installed before you attempt
+ to connect to Location Services. To check that the APK is installed, call
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesUtil.html#isGooglePlayServicesAvailable(android.content.Context)">GooglePlayServicesUtil.isGooglePlayServicesAvailable()</a></code>,
+ which returns one of the
+ integer result codes listed in the API reference documentation. If you encounter an error,
+ call
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesUtil.html#getErrorDialog(int, android.app.Activity, int)">GooglePlayServicesUtil.getErrorDialog()</a></code>
+ to retrieve localized dialog that prompts users to take the correct action, then display
+ the dialog in a {@link android.support.v4.app.DialogFragment}. The dialog may allow the
+ user to correct the problem, in which case Google Play services may send a result back to your
+ activity. To handle this result, override the method
+ {@link android.support.v4.app.FragmentActivity#onActivityResult onActivityResult()}
+
+</p>
+<p class="note">
+ <strong>Note:</strong> To make your app compatible with
+ platform version 1.6 and later, the activity that displays the
+ {@link android.support.v4.app.DialogFragment} must subclass
+ {@link android.support.v4.app.FragmentActivity} instead of {@link android.app.Activity}. Using
+ {@link android.support.v4.app.FragmentActivity} also allows you to call
+ {@link android.support.v4.app.FragmentActivity#getSupportFragmentManager
+ getSupportFragmentManager()} to display the {@link android.support.v4.app.DialogFragment}.
+</p>
+<p>
+ Since you usually need to check for Google Play services in more than one place in your code,
+ define a method that encapsulates the check, then call the method before each connection
+ attempt. The following snippet contains all of the code required to check for Google
+ Play services:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ // Global constants
+ /*
+ * Define a request code to send to Google Play services
+ * This code is returned in Activity.onActivityResult
+ */
+ private final static int
+ CONNECTION_FAILURE_RESOLUTION_REQUEST = 9000;
+ ...
+ // Define a DialogFragment that displays the error dialog
+ public static class ErrorDialogFragment extends DialogFragment {
+ // Global field to contain the error dialog
+ private Dialog mDialog;
+ // Default constructor. Sets the dialog field to null
+ public ErrorDialogFragment() {
+ super();
+ mDialog = null;
+ }
+ // Set the dialog to display
+ public void setDialog(Dialog dialog) {
+ mDialog = dialog;
+ }
+ // Return a Dialog to the DialogFragment.
+ &#64;Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ return mDialog;
+ }
+ }
+ ...
+ /*
+ * Handle results returned to the FragmentActivity
+ * by Google Play services
+ */
+ &#64;Override
+ protected void onActivityResult(
+ int requestCode, int resultCode, Intent data) {
+ // Decide what to do based on the original request code
+ switch (requestCode) {
+ ...
+ case CONNECTION_FAILURE_RESOLUTION_REQUEST :
+ /*
+ * If the result code is Activity.RESULT_OK, try
+ * to connect again
+ */
+ switch (resultCode) {
+ case Activity.RESULT_OK :
+ /*
+ * Try the request again
+ */
+ ...
+ break;
+ }
+ ...
+ }
+ ...
+ }
+ ...
+ private boolean servicesConnected() {
+ // Check that Google Play services is available
+ int resultCode =
+ GooglePlayServicesUtil.
+ isGooglePlayServicesAvailable(this);
+ // If Google Play services is available
+ if (ConnectionResult.SUCCESS == resultCode) {
+ // In debug mode, log the status
+ Log.d("Location Updates",
+ "Google Play services is available.");
+ // Continue
+ return true;
+ // Google Play services was not available for some reason
+ } else {
+ // Get the error code
+ int errorCode = connectionResult.getErrorCode();
+ // Get the error dialog from Google Play services
+ Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
+ errorCode,
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+ // If Google Play services can provide an error dialog
+ if (errorDialog != null) {
+ // Create a new DialogFragment for the error dialog
+ ErrorDialogFragment errorFragment =
+ new ErrorDialogFragment();
+ // Set the dialog in the DialogFragment
+ errorFragment.setDialog(errorDialog);
+ // Show the error dialog in the DialogFragment
+ errorFragment.show(
+ getSupportFragmentManager(),
+ "Location Updates");
+ }
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ Snippets in the following sections call this method to verify that Google Play services is
+ available.
+</p>
+<!--
+ Define Location Services Callbacks
+ -->
+<h2 id="DefineCallbacks">Define Location Services Callbacks</h2>
+<p>
+ Before you request location updates, you must first implement the interfaces that Location
+ Services uses to communicate connection status to your app:
+</p>
+<dl>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html">ConnectionCallbacks</a></code>
+ </dt>
+ <dd>
+ Specifies methods that Location Services calls when a location client is connected or
+ disconnected.
+ </dd>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.OnConnectionFailedListener.html">OnConnectionFailedListener</a></code>
+ </dt>
+ <dd>
+ Specifies a method that Location Services calls if an error occurs while attempting to
+ connect the location client. This method uses the previously-defined {@code showErrorDialog}
+ method to display an error dialog that attempts to fix the problem using Google Play
+ services.
+ </dd>
+</dl>
+<p>
+ The following snippet shows how to specify the interfaces and define the methods:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ GooglePlayServicesClient.ConnectionCallbacks,
+ GooglePlayServicesClient.OnConnectionFailedListener {
+ ...
+ /*
+ * Called by Location Services when the request to connect the
+ * client finishes successfully. At this point, you can
+ * request the current location or start periodic updates
+ */
+ &#64;Override
+ public void onConnected(Bundle dataBundle) {
+ // Display the connection status
+ Toast.makeText(this, "Connected", Toast.LENGTH_SHORT).show();
+ }
+ ...
+ /*
+ * Called by Location Services if the connection to the
+ * location client drops because of an error.
+ */
+ &#64;Override
+ public void onDisconnected() {
+ // Display the connection status
+ Toast.makeText(this, "Disconnected. Please re-connect.",
+ Toast.LENGTH_SHORT).show();
+ }
+ ...
+ /*
+ * Called by Location Services if the attempt to
+ * Location Services fails.
+ */
+ &#64;Override
+ public void onConnectionFailed(ConnectionResult connectionResult) {
+ /*
+ * Google Play services can resolve some errors it detects.
+ * If the error has a resolution, try sending an Intent to
+ * start a Google Play services activity that can resolve
+ * error.
+ */
+ if (connectionResult.hasResolution()) {
+ try {
+ // Start an Activity that tries to resolve the error
+ connectionResult.startResolutionForResult(
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+ /*
+ * Thrown if Google Play services canceled the original
+ * PendingIntent
+ */
+ } catch (IntentSender.SendIntentException e) {
+ // Log the error
+ e.printStackTrace();
+ }
+ } else {
+ /*
+ * If no resolution is available, display a dialog to the
+ * user with the error.
+ */
+ showErrorDialog(connectionResult.getErrorCode());
+ }
+ }
+ ...
+}
+</pre>
+<h3>Define the location update callback</h3>
+<p>
+ Location Services sends location updates to your app either as an {@link android.content.Intent}
+ or as an argument passed to a callback method you define. This lesson shows you how to get the
+ update using a callback method, because that pattern works best for most use cases. If you want
+ to receive updates in the form of an {@link android.content.Intent}, read the lesson
+ <a href="activity-recognition.html">Recognizing the User's Current Activity</a>, which
+ presents a similar pattern.
+</p>
+<p>
+ The callback method that Location Services invokes to send a location update to your app is
+ specified in the
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationListener.html">LocationListener</a></code>
+ interface, in the method
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationListener.html#onLocationChanged(android.location.Location)">onLocationChanged()</a></code>.
+ The incoming argument is a {@link android.location.Location} object containing the location's
+ latitude and longitude. The following snippet shows how to specify the interface and define
+ the method:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ GooglePlayServicesClient.ConnectionCallbacks,
+ GooglePlayServicesClient.OnConnectionFailedListener,
+ LocationListener {
+ ...
+ // Define the callback method that receives location updates
+ &#64;Override
+ public void onLocationChanged(Location location) {
+ // Report to the UI that the location was updated
+ String msg = "Updated Location: " +
+ Double.toString(location.getLatitude()) + "," +
+ Double.toString(location.getLongitude());
+ Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
+ }
+ ...
+}
+</pre>
+<p>
+ Now that you have the callbacks prepared, you can set up the request for location updates.
+ The first step is to specify the parameters that control the updates.
+</p>
+<!-- Specify update parameters -->
+<h2 id="UpdateParameters">Specify Update Parameters</h2>
+<p>
+ Location Services allows you to control the interval between updates and the location accuracy
+ you want, by setting the values in a
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></code>
+ object and then sending this object as part of your request to start updates.
+</p>
+<p>
+ First, set the following interval parameters:
+</p>
+<dl>
+ <dt>
+ Update interval
+ </dt>
+ <dd>
+ Set by
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">LocationRequest.setInterval()</a></code>.
+ This method sets the rate in milliseconds at which your app prefers to receive location
+ updates. If no other apps are receiving updates from Location Services, your app will
+ receive updates at this rate.
+ </dd>
+ <dt>
+ Fastest update interval
+ </dt>
+ <dd>
+ Set by
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">LocationRequest.setFastestInterval()</a></code>.
+ This method sets the <b>fastest</b> rate in milliseconds at which your app can handle
+ location updates. You need to set this rate because other apps also affect the rate
+ at which updates are sent. Location Services sends out updates at the fastest rate that any
+ app requested by calling
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">LocationRequest.setInterval()</a></code>.
+ If this rate is faster than your app can handle, you may encounter problems with UI flicker
+ or data overflow. To prevent this, call
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">LocationRequest.setFastestInterval()</a></code>
+ to set an upper limit to the update rate.
+ <p>
+ Calling
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">LocationRequest.setFastestInterval()</a></code>
+ also helps to save power. When you request a preferred update rate by calling
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">LocationRequest.setInterval()</a></code>,
+ and a maximum rate by calling
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">LocationRequest.setFastestInterval()</a></code>,
+ then your app gets the same update rate as the fastest rate in the system. If other
+ apps have requested a faster rate, you get the benefit of a faster rate. If no other
+ apps have a faster rate request outstanding, your app receives updates at the rate you specified
+ with
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">LocationRequest.setInterval()</a></code>.
+ </p>
+ </dd>
+</dl>
+<p>
+ Next, set the accuracy parameter. In a foreground app, you need constant location updates with
+ high accuracy, so use the setting
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_HIGH_ACCURACY">LocationRequest.PRIORITY_HIGH_ACCURACY</a></code>.
+</p>
+<p>
+ The following snippet shows how to set the update interval and accuracy in
+ {@link android.support.v4.app.FragmentActivity#onCreate onCreate()}:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ GooglePlayServicesClient.ConnectionCallbacks,
+ GooglePlayServicesClient.OnConnectionFailedListener,
+ LocationListener {
+ ...
+ // Global constants
+ ...
+ // Milliseconds per second
+ private static final int MILLISECONDS_PER_SECOND = 1000;
+ // Update frequency in seconds
+ public static final int UPDATE_INTERVAL_IN_SECONDS = 5;
+ // Update frequency in milliseconds
+ private static final long UPDATE_INTERVAL =
+ MILLISECONDS_PER_SECOND * UPDATE_INTERVAL_IN SECONDS;
+ // The fastest update frequency, in seconds
+ private static final int FASTEST_INTERVAL_IN_SECONDS = 1;
+ // A fast frequency ceiling in milliseconds
+ private static final long FASTEST_INTERVAL =
+ MILLISECONDS_PER_SECOND * FASTEST_INTERVAL_IN_SECONDS;
+ ...
+ // Define an object that holds accuracy and frequency parameters
+ LocationResult mLocationRequest;
+ ...
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ // Create the LocationRequest object
+ mLocationRequest = LocationRequest.create();
+ // Use high accuracy
+ mLocationRequest.setPriority(
+ LocationRequest.PRIORITY_HIGH_ACCURACY);
+ // Set the update interval to 5 seconds
+ mLocationRequest.setInterval(UPDATE_INTERVAL);
+ // Set the fastest update interval to 1 second
+ mLocationRequest.setFastestInterval(FASTEST_INTERVAL);
+ ...
+ }
+ ...
+}
+</pre>
+<p class="note">
+ <strong>Note:</strong> If your app accesses the network or does other long-running work after
+ receiving a location update, adjust the fastest interval to a slower value. This prevents your
+ app from receiving updates it can't use. Once the long-running work is done, set the fastest
+ interval back to a fast value.
+</p>
+<!-- Start Location Updates -->
+<h2 id="StartUpdates">Start Location Updates</h2>
+<p>
+ To send the request for location updates, create a location client in
+ {@link android.support.v4.app.FragmentActivity#onCreate onCreate()}, then connect it and make
+ the request by calling
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#requestLocationUpdates(com.google.android.gms.location.LocationRequest, com.google.android.gms.location.LocationListener)">requestLocationUpdates()</a></code>.
+ Since your client must be connected for your app to receive updates, you should
+ connect the client and make the request in
+ {@link android.support.v4.app.FragmentActivity#onStart onStart()}. This ensures that you always
+ have a valid, connected client while your app is visible.
+</p>
+<p>
+ Remember that the user may want to turn off location updates for various reasons. You should
+ provide a way for the user to do this, and you should ensure that you don't start updates in
+ {@link android.support.v4.app.FragmentActivity#onStart onStart()} if updates were previously
+ turned off. To track the user's preference, store it in your app's
+ {@link android.content.SharedPreferences} in
+ {@link android.support.v4.app.FragmentActivity#onPause onPause()} and retrieve it in
+ {@link android.support.v4.app.FragmentActivity#onResume onResume()}.
+</p>
+<p>
+ The following snippet shows how to set up the client in
+ {@link android.support.v4.app.FragmentActivity#onCreate onCreate()}, and how to connect it
+ and request updates in {@link android.support.v4.app.FragmentActivity#onStart onStart()}:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ GooglePlayServicesClient.ConnectionCallbacks,
+ GooglePlayServicesClient.OnConnectionFailedListener,
+ LocationListener {
+ ...
+ // Global variables
+ ...
+ LocationClient mLocationClient;
+ boolean mUpdatesRequested;
+ ...
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ ...
+ // Open the shared preferences
+ mPrefs = getSharedPreferences("SharedPreferences",
+ Context.MODE_PRIVATE);
+ // Get a SharedPreferences editor
+ mEditor = mPrefs.edit();
+ /*
+ * Create a new location client, using the enclosing class to
+ * handle callbacks.
+ */
+ mLocationClient = new LocationClient(this, this, this);
+ // Start with updates turned off
+ mUpdatesRequested = false;
+ ...
+ }
+ ...
+ &#64;Override
+ protected void onPause() {
+ // Save the current setting for updates
+ mEditor.putBoolean("KEY_UPDATES_ON", mUpdatesRequested);
+ mEditor.commit();
+ super.onPause();
+ }
+ ...
+ &#64;Override
+ protected void onStart() {
+ ...
+ mLocationClient.connect();
+ }
+ ...
+ &#64;Override
+ protected void onResume() {
+ /*
+ * Get any previous setting for location updates
+ * Gets "false" if an error occurs
+ */
+ if (mPrefs.contains("KEY_UPDATES_ON")) {
+ mUpdatesRequested =
+ mPrefs.getBoolean("KEY_UPDATES_ON", false);
+
+ // Otherwise, turn off location updates
+ } else {
+ mEditor.putBoolean("KEY_UPDATES_ON", false);
+ mEditor.commit();
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ For more information about saving preferences, read
+<a href="{@docRoot}training/basics/data-storage/shared-preferences.html">Saving Key-Value Sets</a>.
+</p>
+<!--
+ Stop Location Updates
+ -->
+<h2 id="StopUpdates">Stop Location Updates</h2>
+<p>
+ To stop location updates, save the state of the update flag in
+ {@link android.support.v4.app.FragmentActivity#onPause onPause()}, and stop updates in
+ {@link android.support.v4.app.FragmentActivity#onStop onStop()} by calling
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#removeLocationUpdates(com.google.android.gms.location.LocationListener)">removeLocationUpdates(LocationListener)</a></code>.
+ For example:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ GooglePlayServicesClient.ConnectionCallbacks,
+ GooglePlayServicesClient.OnConnectionFailedListener,
+ LocationListener {
+ ...
+ /*
+ * Called when the Activity is no longer visible at all.
+ * Stop updates and disconnect.
+ */
+ &#64;Override
+ protected void onStop() {
+ // If the client is connected
+ if (mLocationClient.isConnected()) {
+ stopPeriodicUpdates();
+ }
+ /*
+ * After disconnect() is called, the client is
+ * considered "dead".
+ */
+ mLocationClient.disconnect();
+ super.onStop();
+ }
+ ...
+}
+</pre>
+<p>
+ You now have the basic structure of an app that requests and receives periodic location updates.
+ You can combine the features described in this lesson with the geofencing, activity recognition,
+ or reverse geocoding features described in other lessons in this class.
+</p>
+<p>
+ The next lesson, <a href="display-address.html">Displaying a Location Address</a>, shows you how
+ to use the current location to display the current street address.
+</p>
diff --git a/docs/html/training/location/retrieve-current.jd b/docs/html/training/location/retrieve-current.jd
new file mode 100644
index 0000000..99e475f
--- /dev/null
+++ b/docs/html/training/location/retrieve-current.jd
@@ -0,0 +1,387 @@
+page.title=Retrieving the Current Location
+trainingnavtop=true
+@jd:body
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#AppPermissions">Specify App Permissions</a></li>
+ <li><a href="#CheckServices">Check for Google Play services</a></li>
+ <li><a href="#DefineCallbacks">Define Location Services Callbacks</a></li>
+ <li><a href="#ConnectClient">Connect the Location Client</a></li>
+ <li><a href="#GetLocation">Get the Current Location</a></li>
+</ol>
+
+<h2>You should also read</h2>
+<ul>
+ <li>
+ <a href="{@docRoot}google/play-services/setup.html">Setup Google Play Services SDK</a>
+ </li>
+</ul>
+
+<h2>Try it out</h2>
+
+<div class="download-box">
+ <a href="http://developer.android.com/shareables/training/LocationUpdates.zip" class="button">Download the sample</a>
+ <p class="filename">LocationUpdates.zip</p>
+</div>
+
+</div>
+</div>
+
+<p>
+ Location Services automatically maintains the user's current location, so all your app has to do
+ is retrieve it as needed. The location's accuracy is based on the location permissions you've
+ requested and location sensors that are currently active for the device.
+<p>
+ Location Services sends the current location to your app through a location client, which is
+ an instance of the Location Services class
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html">LocationClient</a></code>.
+ All requests for location information go through this client.
+</p>
+<p class="note">
+ <strong>Note:</strong> Before you start the lesson, be sure that your development environment
+ and test device are set up correctly. To learn more about this, read the
+ <a href="{@docRoot}google/play-services/setup.html">Setup</a> section in the Google Play
+ services guide.
+</p>
+<!--
+ Specify App Permissions
+ -->
+<h2 id="AppPermissions">Specify App Permissions</h2>
+<p>
+ Apps that use Location Services must request location permissions. Android has two location
+ permissions: {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION}
+ and {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}. The
+ permission you choose controls the accuracy of the current location. If you request only coarse
+ location permission, Location Services obfuscates the returned location to an accuracy
+ that's roughly equivalent to a city block.
+</p>
+<p>
+ Requesting {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION} implies
+ a request for {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_COARSE_LOCATION}.
+</p>
+<p>
+ For example, to add {@link android.Manifest.permission#ACCESS_COARSE_LOCATION
+ ACCESS_COARSE_LOCATION}, insert the following as a child element of the
+ <code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code>
+ element:
+</p>
+<pre>
+&lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt;
+</pre>
+<!--
+ Check for Google Play Services
+ -->
+<h2 id="CheckServices">Check for Google Play Services</h2>
+<p>
+ Location Services is part of the Google Play services APK. Since it's hard to anticipate the
+ state of the user's device, you should always check that the APK is installed before you attempt
+ to connect to Location Services. To check that the APK is installed, call
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesUtil.html#isGooglePlayServicesAvailable(android.content.Context)">GooglePlayServicesUtil.isGooglePlayServicesAvailable()</a></code>,
+ which returns one of the
+ integer result codes listed in the reference documentation for
+<code><a href="{@docRoot}reference/com/google/android/gms/common/ConnectionResult.html">ConnectionResult</a></code>.
+ If you encounter an error, call
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesUtil.html#getErrorDialog(int, android.app.Activity, int)">GooglePlayServicesUtil.getErrorDialog()</a></code>
+ to retrieve localized dialog that prompts users to take the correct action, then display
+ the dialog in a {@link android.support.v4.app.DialogFragment}. The dialog may allow the
+ user to correct the problem, in which case Google Play services may send a result back to your
+ activity. To handle this result, override the method
+ {@link android.support.v4.app.FragmentActivity#onActivityResult onActivityResult()}.
+</p>
+<p>
+ Since you usually need to check for Google Play services in more than one place in your code,
+ define a method that encapsulates the check, then call the method before each connection
+ attempt. The following snippet contains all of the code required to check for Google
+ Play services:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity {
+ ...
+ // Global constants
+ /*
+ * Define a request code to send to Google Play services
+ * This code is returned in Activity.onActivityResult
+ */
+ private final static int
+ CONNECTION_FAILURE_RESOLUTION_REQUEST = 9000;
+ ...
+ // Define a DialogFragment that displays the error dialog
+ public static class ErrorDialogFragment extends DialogFragment {
+ // Global field to contain the error dialog
+ private Dialog mDialog;
+ // Default constructor. Sets the dialog field to null
+ public ErrorDialogFragment() {
+ super();
+ mDialog = null;
+ }
+ // Set the dialog to display
+ public void setDialog(Dialog dialog) {
+ mDialog = dialog;
+ }
+ // Return a Dialog to the DialogFragment.
+ &#64;Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ return mDialog;
+ }
+ }
+ ...
+ /*
+ * Handle results returned to the FragmentActivity
+ * by Google Play services
+ */
+ &#64;Override
+ protected void onActivityResult(
+ int requestCode, int resultCode, Intent data) {
+ // Decide what to do based on the original request code
+ switch (requestCode) {
+ ...
+ case CONNECTION_FAILURE_RESOLUTION_REQUEST :
+ /*
+ * If the result code is Activity.RESULT_OK, try
+ * to connect again
+ */
+ switch (resultCode) {
+ case Activity.RESULT_OK :
+ /*
+ * Try the request again
+ */
+ ...
+ break;
+ }
+ ...
+ }
+ }
+ ...
+ private boolean servicesConnected() {
+ // Check that Google Play services is available
+ int resultCode =
+ GooglePlayServicesUtil.
+ isGooglePlayServicesAvailable(this);
+ // If Google Play services is available
+ if (ConnectionResult.SUCCESS == resultCode) {
+ // In debug mode, log the status
+ Log.d("Location Updates",
+ "Google Play services is available.");
+ // Continue
+ return true;
+ // Google Play services was not available for some reason
+ } else {
+ // Get the error code
+ int errorCode = connectionResult.getErrorCode();
+ // Get the error dialog from Google Play services
+ Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
+ errorCode,
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+
+ // If Google Play services can provide an error dialog
+ if (errorDialog != null) {
+ // Create a new DialogFragment for the error dialog
+ ErrorDialogFragment errorFragment =
+ new ErrorDialogFragment();
+ // Set the dialog in the DialogFragment
+ errorFragment.setDialog(errorDialog);
+ // Show the error dialog in the DialogFragment
+ errorFragment.show(getSupportFragmentManager(),
+ "Location Updates");
+ }
+ }
+ }
+ ...
+}
+</pre>
+<p>
+ Snippets in the following sections call this method to verify that Google Play services is
+ available.
+</p>
+<!--
+ Define Location Services Callbacks
+ -->
+<h2 id="DefineCallbacks">Define Location Services Callbacks</h2>
+<p>
+ To get the current location, create a location client, connect it
+ to Location Services, and then call its
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#getLastLocation()">getLastLocation()</a></code>
+ method. The return value is the best, most recent location, based on the permissions your
+ app requested and the currently-enabled location sensors.
+<p>
+<p>
+ Before you create the location client, implement the interfaces that Location Services uses to
+ communicate with your app:
+</p>
+<dl>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.ConnectionCallbacks.html">ConnectionCallbacks</a></code>
+ </dt>
+ <dd>
+ Specifies methods that Location Services calls when a location client is connected or
+ disconnected.
+ </dd>
+ <dt>
+<code><a href="{@docRoot}reference/com/google/android/gms/common/GooglePlayServicesClient.OnConnectionFailedListener.html">OnConnectionFailedListener</a></code>
+ </dt>
+ <dd>
+ Specifies a method that Location Services calls if an error occurs while attempting to
+ connect the location client. This method uses the previously-defined {@code showErrorDialog}
+ method to display an error dialog that attempts to fix the problem using Google Play
+ services.
+ </dd>
+</dl>
+<p>
+ The following snippet shows how to specify the interfaces and define the methods:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ GooglePlayServicesClient.ConnectionCallbacks,
+ GooglePlayServicesClient.OnConnectionFailedListener {
+ ...
+ /*
+ * Called by Location Services when the request to connect the
+ * client finishes successfully. At this point, you can
+ * request the current location or start periodic updates
+ */
+ &#64;Override
+ public void onConnected(Bundle dataBundle) {
+ // Display the connection status
+ Toast.makeText(this, "Connected", Toast.LENGTH_SHORT).show();
+
+ }
+ ...
+ /*
+ * Called by Location Services if the connection to the
+ * location client drops because of an error.
+ */
+ &#64;Override
+ public void onDisconnected() {
+ // Display the connection status
+ Toast.makeText(this, "Disconnected. Please re-connect.",
+ Toast.LENGTH_SHORT).show();
+ }
+ ...
+ /*
+ * Called by Location Services if the attempt to
+ * Location Services fails.
+ */
+ &#64;Override
+ public void onConnectionFailed(ConnectionResult connectionResult) {
+ /*
+ * Google Play services can resolve some errors it detects.
+ * If the error has a resolution, try sending an Intent to
+ * start a Google Play services activity that can resolve
+ * error.
+ */
+ if (connectionResult.hasResolution()) {
+ try {
+ // Start an Activity that tries to resolve the error
+ connectionResult.startResolutionForResult(
+ this,
+ CONNECTION_FAILURE_RESOLUTION_REQUEST);
+ /*
+ * Thrown if Google Play services canceled the original
+ * PendingIntent
+ */
+ } catch (IntentSender.SendIntentException e) {
+ // Log the error
+ e.printStackTrace();
+ }
+ } else {
+ /*
+ * If no resolution is available, display a dialog to the
+ * user with the error.
+ */
+ showErrorDialog(connectionResult.getErrorCode());
+ }
+ }
+ ...
+}
+</pre>
+<!--
+ Connect the Location Client
+ -->
+<h2 id="ConnectClient">Connect the Location Client</h2>
+<p>
+ Now that the callback methods are in place, create the location client and connect it to
+ Location Services.
+</p>
+<p>
+ You should create the location client in {@link android.support.v4.app.FragmentActivity#onCreate
+ onCreate()}, then connect it in
+ {@link android.support.v4.app.FragmentActivity#onStart onStart()}, so that Location Services
+ maintains the current location while your activity is fully visible. Disconnect the client in
+ {@link android.support.v4.app.FragmentActivity#onStop onStop()}, so that when your app is not
+ visible, Location Services is not maintaining the current location. Following this pattern of
+ connection and disconnection helps save battery power. For example:
+</p>
+<p class="note">
+ <strong>Note:</strong> The current location is only maintained while a location client is
+ connected to Location Service. Assuming that no other apps are connected to Location Services,
+ if you disconnect the client and then sometime later call
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#getLastLocation()">getLastLocation()</a></code>,
+ the result may be out of date.
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ GooglePlayServicesClient.ConnectionCallbacks,
+ GooglePlayServicesClient.OnConnectionFailedListener {
+ ...
+ &#64;Override
+ protected void onCreate(Bundle savedInstanceState) {
+ ...
+ /*
+ * Create a new location client, using the enclosing class to
+ * handle callbacks.
+ */
+ mLocationClient = new LocationClient(this, this, this);
+ ...
+ }
+ ...
+ /*
+ * Called when the Activity becomes visible.
+ */
+ &#64;Override
+ protected void onStart() {
+ super.onStart();
+ // Connect the client.
+ mLocationClient.connect();
+ }
+ ...
+ /*
+ * Called when the Activity is no longer visible.
+ */
+ &#64;Override
+ protected void onStop() {
+ // Disconnecting the client invalidates it.
+ mLocationClient.disconnect();
+ super.onStop();
+ }
+ ...
+}
+</pre>
+<!--
+ Get the Current Location
+ -->
+<h2 id="GetLocation">Get the Current Location</h2>
+<p>
+ To get the current location, call
+<code><a href="{@docRoot}reference/com/google/android/gms/location/LocationClient.html#getLastLocation()">getLastLocation()</a></code>.
+ For example:
+</p>
+<pre>
+public class MainActivity extends FragmentActivity implements
+ GooglePlayServicesClient.ConnectionCallbacks,
+ GooglePlayServicesClient.OnConnectionFailedListener {
+ ...
+ // Global variable to hold the current location
+ Location mCurrentLocation;
+ ...
+ mCurrentLocation = mLocationClient.getLastLocation();
+ ...
+}
+</pre>
+<p>
+ The next lesson, <a href="receive-location-updates.html">Receiving Location Updates</a>, shows
+ you how to receive periodic location updates from Location Services.
+</p>
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index f0d3359..ee6913c 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -193,9 +193,9 @@
</li>
</ul>
</li><!-- end getting started -->
-
-
-
+
+
+
<li class="nav-section">
<div class="nav-section-header">
@@ -204,7 +204,7 @@
</a>
</div>
<ul>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/managing-audio/index.html"
@@ -255,8 +255,8 @@
</ul>
</li>
<!-- End multimedia -->
-
-
+
+
<li class="nav-section">
<div class="nav-section-header">
@@ -265,7 +265,7 @@
</a>
</div>
<ul>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/displaying-bitmaps/index.html"
@@ -364,7 +364,7 @@
</ul>
</li>
<!-- End graphics and animation -->
-
+
<li class="nav-section">
<div class="nav-section-header">
@@ -399,7 +399,7 @@
</li>
</ul>
</li>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/basics/network-ops/index.html"
@@ -473,8 +473,8 @@
</ul>
</li>
<!-- End connectivity and cloud -->
-
-
+
+
<li class="nav-section">
<div class="nav-section-header">
@@ -541,23 +541,33 @@
<li class="nav-section">
<div class="nav-section-header">
- <a href="<?cs var:toroot ?>training/basics/location/index.html"
- description=
- "How to add location-aware features to your app by aqcuiring the user's current
- location."
- >Making Your App Location Aware</a>
+ <a href="<?cs var:toroot ?>training/location/index.html"
+ description="How to add location-aware features to your app by getting the user's current location.">
+ Making Your App Location-Aware
+ </a>
</div>
<ul>
- <li><a href="<?cs var:toroot ?>training/basics/location/locationmanager.html">
- Using the Location Manager
+ <li>
+ <a href="<?cs var:toroot ?>training/location/retrieve-current.html">
+ Retrieving the Current Location
+ </a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/location/receive-location-updates.html">
+ Receiving Location Updates
+ </a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/location/display-address.html">
+ Displaying a Location Address
</a>
</li>
- <li><a href="<?cs var:toroot ?>training/basics/location/currentlocation.html">
- Obtaining the Current Location
+ <li><a href="<?cs var:toroot ?>training/location/geofencing.html">
+ Creating and Monitoring Geofences
</a>
</li>
- <li><a href="<?cs var:toroot ?>training/basics/location/geocoding.html">
- Displaying a Location Address
+ <li><a href="<?cs var:toroot ?>training/location/activity-recognition.html">
+ Recognizing the User's Current Activity
</a>
</li>
</ul>
@@ -565,8 +575,8 @@
</ul>
</li>
<!-- End privacy and location -->
-
-
+
+
<li class="nav-section">
<div class="nav-section-header">
@@ -696,8 +706,8 @@
</li>
</ul>
</li>
-
-
+
+
<li class="nav-section">
<div class="nav-section-header">
<a href="/training/multiscreen/index.html"
@@ -755,7 +765,7 @@
</li>
</ul>
</li>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/custom-views/index.html"
@@ -810,7 +820,7 @@
</li>
</ul>
</li>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/accessibility/index.html"
@@ -830,11 +840,11 @@
</li>
</ul>
</li>
-
+
</ul>
</li>
<!-- End best UX and UI -->
-
+
<li class="nav-section">
<div class="nav-section-header">
@@ -844,7 +854,7 @@
</a>
</div>
<ul>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/gestures/index.html"
@@ -879,7 +889,7 @@
</li>
</ul>
</li>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/keyboard-input/index.html"
@@ -919,7 +929,7 @@
</a>
</div>
<ul>
-
+
<li>
<a href="<?cs var:toroot ?>training/articles/perf-tips.html"
description=
@@ -927,7 +937,7 @@
responsiveness and battery efficiency."
>Performance Tips</a>
</li>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/improving-layouts/index.html"
@@ -996,7 +1006,7 @@
</li>
</ul>
</li>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="/training/monitoring-device-state/index.html"
@@ -1062,7 +1072,7 @@
</li>
</ul>
</li>
-
+
<li>
<a href="<?cs var:toroot ?>training/articles/perf-anr.html"
description=
@@ -1070,7 +1080,7 @@
display an &quot;Application Not Responding&quot; dialog."
>Keeping Your App Responsive</a>
</li>
-
+
<li>
<a href="<?cs var:toroot ?>training/articles/perf-jni.html"
description=
@@ -1085,8 +1095,8 @@
</li>
</ul>
</li> <!-- end of Performance -->
-
-
+
+
<li class="nav-section">
<div class="nav-section-header">
@@ -1110,7 +1120,7 @@
"How to ensure that your app is secure when performing network transactions."
>Security with HTTPS and SSL</a>
</li>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/enterprise/index.html"
@@ -1162,7 +1172,7 @@
</li>
</ul>
</li>
-
+
<li class="nav-section">
<div class="nav-section-header">
<a href="<?cs var:toroot ?>training/multiple-apks/index.html"
diff --git a/location/java/android/location/package.html b/location/java/android/location/package.html
index 2732efc..81fcea4 100644
--- a/location/java/android/location/package.html
+++ b/location/java/android/location/package.html
@@ -1,9 +1,20 @@
<html>
<body>
-<p>Contains classes that define Android location-based and related services.</p>
+<p>Contains the framework API classes that define Android location-based and related services.</p>
+<p class="note">
+ <strong>Note:</strong> The Google Location Services API, part of Google Play
+ Services, provides a more powerful, high-level framework that automates tasks such as
+ location provider choice and power management. Location Services also provides new
+ features such as activity detection that aren't available in the framework API. Developers who
+ are using the framework API, as well as developers who are just now adding location-awareness
+ to their apps, should strongly consider using the Location Services API.
+<br/>
+ To learn more about the Location Services API, see
+ <a href="{@docRoot}google/play-services/location.html">Location APIs</a>.
+</p>
-<p>For more information, see the
+<p>For more information about the framework API, see the
<a href="{@docRoot}guide/topics/location/index.html">Location and Maps</a> guide.</p>
{@more}