Merge "Updataed Google Play services Javadocs for v6.1 (Manchego) release." into klp-modular-docs
diff --git a/docs/html/app.yaml b/docs/html/app.yaml
index 9ffb775..520ee99 100644
--- a/docs/html/app.yaml
+++ b/docs/html/app.yaml
@@ -1,38 +1,25 @@
application: androidappdocs-staging
version: 1
-runtime: python
+runtime: python27
+threadsafe: true
api_version: 1
+# compatibility: gae-1.9.4+
-# This file defines two mutually exclusive
-# hander blocks:
-# - a handler for use on a local dev_appserver
-# during development or non-production doc build
-# - a handler for use on a production gae
-# instance. This handler requires that the
-# docs files in the app have been compressed
-# with divide_and_compress.py and that main.py
-# and gae_shell/ are present.
-#
-# Only one of the handler blocks should be
-# uncommented at any given time. By default,
-# the development handler is exposed.
+# handler for local staging servers
+# WARNING: NOT FOR USE IN PRODUCTION
+
+# Use this handler definition with
+# Google App Engine 1.9.4 or higher.
+# NOT compatible with prior GAE versions
handlers:
# DEVELOPMENT HANDLER
-# (this handler block *must* be commented
-# out before pushing to a production server)
-- url: /
- static_dir: /
+- url: /(.+)
+ static_files: \1
+ upload: (.+)
-# PRODUCTION GAE HANDLER
-#- url: /gae_shell/static
-# static_dir: gae_shell/static
-# expiration: 1d
-#
-#- url: /gae_shell/.*
-# script: /gae_shell/shell.py
-# login: admin
-#
-#- url: .*
-# script: main.py
+# Direct default, blank requests
+- url: /
+ static_files: index.html
+ upload: index.html
\ No newline at end of file
diff --git a/docs/html/distribute/googleplay/about.jd b/docs/html/distribute/googleplay/about.jd
index c7c91ac..c25a9cf 100644
--- a/docs/html/distribute/googleplay/about.jd
+++ b/docs/html/distribute/googleplay/about.jd
@@ -25,7 +25,7 @@
<p>
Google Play is the premier store for distributing Android apps. When you
publish on Google Play, you put your apps in front of Android's huge base of
- active customers, in more than 130 countries and territories across the
+ active customers, in more than 190 countries and territories across the
world.
</p>
diff --git a/docs/html/distribute/googleplay/edu/start.jd b/docs/html/distribute/googleplay/edu/start.jd
index 067a15f..3c3a175 100644
--- a/docs/html/distribute/googleplay/edu/start.jd
+++ b/docs/html/distribute/googleplay/edu/start.jd
@@ -9,27 +9,23 @@
<div id="qv-wrapper"><div id="qv">
<h2>Steps to Join</h2>
<ol>
-<li><a href="#register">Register for a Publisher Account</li>
+<li><a href="#register">Register for a Publisher Account</a></li>
<li><a href="#prepare">Prepare Your Apps</a></li>
<li><a href="#publish">Publish Your Apps</a></li>
<li><a href="#related-resources">Related Resources</a></li>
</ol>
</div></div>
<p>
- If you've got great Android apps for education and want to reach even more teachers
+ If you've got great Android and Chrome apps for education and want to reach even more teachers
and students, you can join the <strong>Google Play for Education</strong>
program in a few simple steps. You do everything using the familiar tools and
- processes in Google Play.
+ processes you currently use to manage your Android or Chrome apps.
</p>
<p>
Note that Google Play for Education is currently available to <strong>K-12 schools in the United
States</strong> only.</p>
-<p>If you have an educational Chrome app instead of an Android app, you can learn more about
-Chrome Apps in Google Play for Education at <a href=
-"https://developers.google.com/edu">developers.google.com/edu</a>.
-</p>
<img src="{@docRoot}images/gpfe-start-0.jpg" style=
"border:1px solid #ddd;padding:0px" width="760" height="403">
@@ -43,23 +39,20 @@
</div>
<p>
- If you’re new to Google Play, review the information on <a href=
+ To publish an Android app in Google Play for Education, review the information on <a href=
"{@docRoot}distribute/googleplay/start.html">getting started</a> with
publishing on Google Play. You’ll gain access to the <a href=
"{@docRoot}distribute/googleplay/developer-console.html">Developer
Console</a>, where you’ll manage your details, apps, and payments.
</p>
+<p>To publish a Chrome app in Google Play for Education, you'll need a
+<a href="https://developer.chrome.com/webstore/publish">Chrome Web Store account</a>.</p>
+
<div class="headerLine">
<h2 id="prepare">
Prepare Your Apps
</h2>
-
-
-</div>
-
-<div class="figure-right">
- <img src="{@docRoot}images/gp-edu-process.png">
</div>
<p>
@@ -77,13 +70,13 @@
To prepare for a launch on Google Play for Education, start by reviewing the
guidelines for educational apps in Google Play and the policies that apply to
your apps. See the <a href=
- "{@docRoot}distribute/essentials/gpfe-guidelines.html">Education
+ "https://developers.google.com/edu/guidelines">Education
Guidelines</a> for details.
</p>
<p>
Also, make sure that you're familiar with the policies that your app must
- comply with, including <a href=
+ comply with. For Android, they include <a href=
"http://play.google.com/about/developer-content-policy.html">content
policies</a>, the <a href=
"http://play.google.com/about/developer-distribution-agreement.html">Developer
@@ -91,6 +84,14 @@
"https://play.google.com/about/developer-distribution-agreement-addendum.html">
Google Play for Education Addendum</a>.
</p>
+<p>For Chrome, they include <a href=
+ "https://developer.chrome.com/webstore/program_policies">content
+ policies</a>, the <a href=
+ "https://developer.chrome.com/webstore/terms">Developer
+ Distribution Agreement</a>, and <a href=
+ "https://developers.google.com/edu/chrome-d-d-a-addendum">
+ Google Play for Education Addendum</a>.
+</p>
<h3>
Design and develop a great app for education
@@ -105,7 +106,7 @@
<p>
Assess your app against the criteria listed in the <a href=
- "{@docRoot}distribute/essentials/gpfe-guidelines.html">Education
+ "https://developers.google.com/edu/guidelines">Education
Guidelines</a> and plan on supporting them to the greatest extent possible.
In some cases you might need to modify the app’s features or UI to support
classroom requirements. It's a good idea to identify any changes early in
@@ -113,7 +114,7 @@
</p>
<p>
- With Google Play for Education, optimizing your apps for tablets is crucial.
+ With Google Play for Education, optimizing your Android apps for tablets is crucial.
A variety of resources are available to help you understand what you need to
do — a good starting point is the <a href=
"{@docRoot}distribute/essentials/quality/tablets.html">Tablet App Quality</a>
@@ -132,6 +133,11 @@
</p>
<p>
+For Chrome apps, optimizing your apps for mouse, keyboard, and touch is just as important.
+Some students will use touch as their primary input method, and some will have Chromebooks
+without touch. Make sure your app works for all students.
+</p>
+<p>
Comprehensive testing and quality assurance are key aspects of delivering
great apps for teachers and students. Make sure you set up a <a href=
"{@docRoot}distribute/essentials/gpfe-guidelines.html#test-environment">proper
@@ -160,15 +166,13 @@
apps.
</li>
- <li>Publish your apps in the Developer Console as normal, but opt-in to
+ <li>Publish your apps in the Developer Console (for Android apps) or the Chrome Web Store
+ (for Chrome apps) as normal, but opt-in to
Google Play for Education.
</li>
</ul>
-<h3 id="opt-in">
- Opt-in to Google Play for Education and publish
-</h3>
-
+<h3>Opt-in to Google Play for Education and publish Android apps</h3>
<p>
Once you've built your release-ready APK upload it to the Developer Console,
create your store listing, and set distribution options. If you aren't
@@ -231,7 +235,7 @@
will be shown to educators when they are browsing your app.
</li>
- <li>Click <strong>Save</strong>f to save your Pricing and Distribution
+ <li>Click <strong>Save</strong> to save your Pricing and Distribution
changes.
</li>
</ol>
@@ -247,58 +251,55 @@
</div>
<p>
- Once you save changes and publish your app, the app will be submitted to our
- third-party educator network for review and approval. If the app is already
- published, it will be submitted for review as soon as you opt-in and save
- your changes.
+ Once you save changes and publish your app, the app will be available on Google Play for
+ Education. We may submit your app to our
+ third-party educator network for additional review and to be featured and badged as
+ Educator-approved.
</p>
<p class="note">
<strong>Note</strong>: Google Play for Education is part of Google Play. When
- you publish an app that's opted-in to Google Play for Education, the app
- becomes available to users in Google Play right away. After the app is
- <a href="{@docRoot}distribute/essentials/gpfe-guidelines.html#e-value">review
- and approval</a>, it then becomes available to educators in Google Play for
- Education.
+ you publish an Android app that's opted-in to Google Play for Education, the app
+ becomes available to users in Google Play.
</p>
-<h3>
- Track your review and approval
-</h3>
-
+<h3>Opt-in to Google Play for Education and publish Chrome apps</h3>
<p>
- As soon as you opt-in to Google Play for Education and publish, your apps are
- queued for review by our third-party educator network. The review and
- approval process can take four weeks or more. You'll receive notification by
- email (to your developer account address) when the review is complete, with a
- summary of the review results.
+Once you've uploaded your app or extension to the Developer Dashboard, create your store listing
+and set distribution options.
</p>
-
<p>
- At any time, you can check the review and approval status of your app in the
- Developer Console, under "Google Play for Education" in the app's Pricing and
- Distribution page. There are three approval states:
+When your apps are ready to publish, you opt-in to Google Play for Education directly from the
+<a href="https://chrome.google.com/webstore/developer/dashboard">Developer Dashboard</a>.
+Opt-in means that you want your apps to be made available to educators
+through Google Play for Education, including review, classification, and approval by our
+third-party educator network.
+</p>
+<p>
+Opt-in also confirms that your app complies with
+<a href="https://developer.chrome.com/webstore/program_policies">Chrome Web Store Program Policies</a>
+and the <a href="https://developer.chrome.com/webstore/terms">Terms of Service</a>, including a
+<a href="https://developers.google.com/edu/chrome-d-d-a-addendum">Google Play for Education Addendum</a>.
+If you are not familiar with these
+policy documents or the Addendum, make sure to read them before opting-in.
</p>
-<ul>
- <li>
- <em>Pending</em> — Your app was sent for review and the review isn't
- yet complete.
- </li>
+<p>Here's how to opt-in to Google Play for Education for a specific app or extension:</p>
+<ol>
+<li>In the Developer Dashboard, click <b>Edit</b> on the app you want to opt-in.</li>
+<li>Scroll down to <b>Google Play for Education</b> and review the additional
+Developer Terms and Conditions.</li>
+<li>Select the checkbox to opt-in to include this item in Google Play for Education.</li>
+<li>Click <b>Publish Changes</b> to save your changes and submit your application.
+Once you save changes and publish your app, the app will be available on Google Play for Education.
+We may submit your app to our third-party educator network for additional review, and to be
+featured and badged as Educator-approved.</li>
+<p class="note"><b>Note:</b>
+When you publish an app that's opted-in to Google Play for Education,
+the app becomes available to users in the Chrome Web Store.
+</p>
+</ol>
- <li>
- <em>Approved</em> — Your app was reviewed and approved. The app will
- be made available directly to educators through Google Play for Education.
- Once your app is approved, you can update it at your convenience without
- needing another full review.
- </li>
-
- <li>
- <em>Not approved</em> — Your app was reviewed and not approved. Check
- the notification email send for information about why the app wasn’t
- approved. You can address any issues and opt-in again for another review.
- </li>
-</ul>
<div class="headerLine">
<h2 id="related-resources">Related Resources</h2>
</div>
diff --git a/docs/html/distribute/monetize/ecommerce.jd b/docs/html/distribute/monetize/ecommerce.jd
index 65e2b20..dc56d46 100644
--- a/docs/html/distribute/monetize/ecommerce.jd
+++ b/docs/html/distribute/monetize/ecommerce.jd
@@ -16,7 +16,7 @@
physical goods and services, such as clothing or movie tickets, through your
apps using <a href=
"https://developers.google.com/wallet/instant-buy/">Instant Buy for
- Android</a> in the US.
+ Android</a> <strong>(US Only)</strong>.
</p>
<p>
diff --git a/docs/html/distribute/stories/games.jd b/docs/html/distribute/stories/games.jd
index 1a482b1..2351eed 100644
--- a/docs/html/distribute/stories/games.jd
+++ b/docs/html/distribute/stories/games.jd
@@ -1,246 +1,28 @@
page.title=Developer Stories: Google Play Game Services
-meta.tags="google play, developer story, games, global"
+meta.tags="google play, story, stories, games, global"
page.image=/images/distribute/glu-ew-gpgames.jpg
-page.metaDescription=How gaming studios are using Google Play game services to deliver new gaming experiences for their users.
+page.metaDescription=How game studios are using Google Play game services to deliver new gaming experiences for their users.
@jd:body
-<p>One of the goals of <a href="https://developers.google.com/games/">Google
-Play game services</a> is to allow developers to focus on what they’re good at
-as game developers — creating great gaming experiences for their users, by
-building on top of what Google is good at: mobile and cloud services. Integral
-to that is an easy integration process, one that provides a whole host of
-features with little engineering work required.</p>
+<p>
+ <a href="https://developers.google.com/games/">Google Play game services</a>
+ lets you add great social features to your games quickly, without having to
+ build them yourself. You can add multiplayer, game invites, quests, and a
+ variety of other features — all from within your app. Google provides
+ cross-platform game and player infrastructure for you, as well as insights
+ and analytics to help you understand the activities of users in your games.
+</p>
-<p>The gaming studios below understood the opportunity that Google Play game
-services unlocked, and are starting to see real results following their
-successful integrations. </p>
+<p>
+ The case study presentations below highlight how top game studios are taking
+ advantage of Google Play game services — the features they've added and
+ the results they are seeing. Each deck (PDF) is focused on a single game and
+ how it uses a specific Google Play gemes feature.
+</p>
-<div style="margin-bottom:2em;"><!-- START STORY -->
-
-<h3>Concrete Software — Straightforward, easy to implement</h3>
-
-<img alt="" class="screenshot thumbnail" style="-webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px height:78px;
- width: 78px;
- float: left;
- margin: 12px 20px 9px 20px;"
- src="http://lh6.ggpht.com/_UOay5HBxf077suKYzmikU2IbnYOJub3X0inz-LoUsVh4TX758BEyArjoR7owXijkAA=w124">
-
-<div style="list-style: none;height:100%;
- float: right;
- border-top: 1px solid #9C0;
- width: 220px;
- margin: 4px 20px;padding: .5em;">
-
- <h5>About the developer</h5>
- <ul>
- <li><a href="https://play.google.com/store/apps/developer?id=Concrete%20Software%2C%20Inc.">Concrete Software</a>,
- makers of <a href="https://play.google.com/store/apps/details?id=com.concretesoftware.pbachallenge_androidmarket&hl=en">PBA
- Bowling Challenge</a></li>
- <li>Added support for multiplayer, leaderboards and achievements through Google Play game
- services</li>
- </ul>
-
- <h5>Results</h5>
- <ul>
- <li>Session lengths have increased more than 15%</li>
- </ul>
-
- <div style="padding:.5em 0 0 1em;">
- <a href="https://play.google.com/store/apps/details?id=com.concretesoftware.pbachallenge_androidmarket&hl=en">
- <img alt="Android app on Google Play" src="{@docRoot}images/brand/en_generic_rgb_wo_45.png" />
- </a>
- </div>
-</div>
-
-<div style="line-height:1.4em;">
-<p style="margin-top:0;margin-bottom:12px;">Concrete Software added several
-features from Google Play game services into one of their top titles,
-<a href="https://play.google.com/store/apps/details?id=com.concretesoftware.pbachallenge_androidmarket">PBA
-Bowling Challenge</a>, including support for multiplayer, leaderboards, and
-achievements.</p>
-
-<p>So far, their users have loved the new additions: average session length
-is up more than 15%. Keith Pichelman, CEO of Concrete Software, explains: </p>
-
-<p>"The Google Play game services were straightforward and easy to implement. We
-had been researching options for multiplayer services, so when Google Play game
-services came out, it was an easy decision for us. Not only were they easy to
-integrate, but the features have worked flawlessly. </p>
-
-<p>"PBA Bowling Challenge now has real-time multiplayer which our users instantly
-were thrilled with; you can see in the reviews how people immediately raved about
-the new game experience. </p>
-
-<p>"We also included achievements, leaderboards, and most recently cloud
-synchronization from the Google Play game services as well. Using the game
-services in PBA Bowling Challenge was a huge success, enough so that we are now
-going back to our other titles, adding the features to them as well."</p>
-</div>
-
-<div style="clear:both;margin-top:40px;width:auto;">
-
- <img src="{@docRoot}images/distribute/concrete-pbc-gpgames.jpg">
-
- <div style="width:600px;margin-top:0px;padding:0 90px;">
- <p class="image-caption"><span style="font-weight:500;">Session lengths up:</span>
- After adding support for multiplayer with Google Play game services, Concrete
- Software saw an increase in session lengths of more than 15% for PBA Bowling
- Challenge.</p>
- </div>
-</div>
-</div> <!-- END STORY -->
-
-<div style="margin:3em auto"><!-- START STORY -->
-
-<h3>Glu: It’s a must-have for all titles</h3>
-
-<img alt="" class="screenshot thumbnail" style="-webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px height:78px;
- width: 78px;
- float: left;
- margin: 12px 20px 30px 20px;"
- src="http://lh4.ggpht.com/Q7mQJsdhulW4_s039R9aaRhQkGnyzLkhF00j5EnyhHOivijnyi7P7b5A8qG0xk1r-jQ=w124">
-
-<div style="list-style: none;height:100%;
- float: right;
- border-top: 1px solid #9C0;
- width: 220px;
- margin: 4px 20px;padding: .5em;">
-
- <h5>About the developer</h5>
- <ul>
- <li><a href="https://play.google.com/store/apps/developer?id=Glu+Mobile">Glu
- Mobile</a>, creators of <a href="https://play.google.com/store/apps/details?id=com.glu.ewarriors2">Eternity
- Warriors 2</a></li>
- <li>Has already integrated 5 titles with Google Play game services</li>
- </ul>
-
- <h5>Results</h5>
- <ul>
- <li>In Eternity Warriors 2, 7-day user retention is up 40%</li>
- <li>20% increase in play sessions per day as well</li>
- </ul>
-
- <div style="padding:.5em 0 0 1em;">
- <a href="https://play.google.com/store/apps/details?id=com.glu.ewarriors2">
- <img alt="Android app on Google Play" src="{@docRoot}images/brand/en_generic_rgb_wo_45.png" />
- </a>
- </div>
-</div>
-
-<div style="line-height:1.4em;">
-<p style="margin-top:0;margin-bottom:12px;">Glu was one of the first developers
-to integrate Google Play game services, with
-<a href="https://play.google.com/store/apps/details?id=com.glu.ewarriors2">Eternity
-Warriors 2</a>. Based on this first success, Glu has integrated game services
-into several more games, including Samurai vs. Zombies 2, Frontline Commando:
-D-Day, Contract Killer 2, and Zombies Ate My Friends.</p>
-
-<p>Already supported in Eternity Warriors 2, they’ve seen a 40% increase in 7-day
-user retention and a 20% increase in play sessions per day. Sourabh Ahuja, Glu's
-Vice President of Android Development, explains:</p>
-
-<p>“Multiplayer, leaderboards, achievements — these are all things that we
-had to build individually for our titles. The availability of these features in
-Google Play game services helps us make our games stickier, and it’s awesome that
-it comes directly from Google. </p>
-
-<p>"It’s flexible enough that we were able to make it interoperable with our
-in-house systems. We look forward to utilizing game services extensively across
-our portfolio."</p>
-</div>
-
-<div style="clear:both;margin-top:40px;width:auto;">
-
- <img src="{@docRoot}images/distribute/glu-ew-gpgames.jpg"></a>
-
- <div style="width:600px;margin-top:0px;padding:0 90px;">
- <p class="image-caption"><span style="font-weight:500;">User retention up:</span>
- Glu saw a 40% increase in 7-day user retention for Eternity Warriors 2 after
- integrating with Google Play game services.</p>
- </div>
-</div>
-</div> <!-- END STORY -->
-
-
-<div style="margin-bottom:2em;"><!-- START STORY -->
-
-<h3>Vector-Unit: An awesome multiplayer experience</h3>
-
-<img alt="" class="screenshot thumbnail" style="-webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px height:78px;
- width: 78px;
- float: left;
- margin: 12px 20px 9px 20px;" src=
- "http://lh3.ggpht.com/dTUrKLffqXHJtPuIlp8fjDhROuzrTcpidbNFprugR65hMrPLX7Omd8SGop0xMXXKzcw=w124">
-
-<div style="list-style: none;height:100%;
- float: right;
- border-top: 1px solid #9C0;
- width: 220px;
- margin: 4px 20px;padding: .5em;">
-
- <h5>About the developer</h5>
- <ul>
- <li><a href="https://play.google.com/store/apps/developer?id=Vector+Unit">Vector
- Unit</a>, creators of <a href="https://play.google.com/store/apps/details?id=com.vectorunit.red">Riptide
- GP2</a></li>
- <li>Added multiplayer to Riptide GP2 through Google Play game services </li>
- </ul>
-
- <h5>Results</h5>
- <ul>
- <li>With an easy multiplayer solution, they were able to focus on the
- gameplay</li>
- <li>Early reviews of Riptide GP2 called multiplayer “one of the sweetest
- cherries on top!”</li>
- </ul>
-
- <div style="padding:.5em 0 0 1em;">
- <a href="https://play.google.com/store/apps/details?id=com.vectorunit.red">
- <img alt="Android app on Google Play" src="{@docRoot}images/brand/en_generic_rgb_wo_45.png" />
- </a>
- </div>
-</div>
-
-<div style="line-height:1.4em;">
-<p style="margin-top:0;margin-bottom:12px;">Vector Unit just launched their
-latest title, <a href="https://play.google.com/store/apps/details?id=com.vectorunit.red">Riptide
-GP2</a>, with Google Play game services integration, and it has one of the strongest
-integrations of multiplayer yet. Early reviews call multiplayer “one of the sweetest
-cherries on top!”.</p>
-
-<p>Ralf Knoesel, CTO of Vector Unit, tells more about how they've used Google Play game
-services:</p>
-
-<p>“We wanted to provide a really compelling multiplayer experience for our users, and
-Google Play game services allowed us to do just that. With multiplayer, you can show off
-your skills and your custom-tuned hydro jet in 4-way online battles with friends and
-players around the world. </p>
-
-<p>"By providing an easy way to power this multiplayer experience, we were able to focus
-on making the gameplay come alive — like the stunts, which are more daring and
-slicker than ever (with more of them to master), or the realistic detail of the water
-splashing against the camera lens.”</p>
-
-</div>
-
-<div style="clear:both;margin-top:40px;width:auto;">
-
- <img src="{@docRoot}images/distribute/vector-unit-rt-gpgames.jpg"></a>
-
- <div style="width:600px;margin-top:0px;padding:0 90px;">
- <p class="image-caption"><span style="font-weight:500;">Multiplayer and more:</span>
- Google Play game services helped Vector Unit pack an awesome multiplayer experience
- into Riptide GP 2, so they could focus on building a great gaming experience.</p>
- </div>
-</div>
-</div> <!-- END STORY -->
-
-
-
+<div class="resource-widget resource-flow-layout col-13"
+ data-query="collection:distribute/stories/games"
+ data-sortOrder="-timestamp"
+ data-cardSizes="18x12"
+ data-maxResults="32"></div>
\ No newline at end of file
diff --git a/docs/html/distribute/tools/localization-checklist.jd b/docs/html/distribute/tools/localization-checklist.jd
index 08a8143..e640243 100644
--- a/docs/html/distribute/tools/localization-checklist.jd
+++ b/docs/html/distribute/tools/localization-checklist.jd
@@ -529,21 +529,6 @@
<strong>Purchase professional translations through Google Play</strong>
</h4>
-<div class="sidebox-wrapper">
- <div class="sidebox">
- <h2>
- App Translations Service
- </h2>
-
- <p>
- To make it easy to export your app's strings and import the finished
- translations into your project, try the <a href=
- "{@docRoot}sdk/installing/installing-adt.html#tmgr">ADT Translation
- Manager Plugin</a>.
- </p>
- </div>
-</div>
-
<p>
Google Play App Translation Service can help you quickly find and purchase
translations of your app. In the Developer Console, you can browse a list of
diff --git a/docs/html/distribute/users/build-buzz.jd b/docs/html/distribute/users/build-buzz.jd
index 412589f..bfdc095 100644
--- a/docs/html/distribute/users/build-buzz.jd
+++ b/docs/html/distribute/users/build-buzz.jd
@@ -126,7 +126,7 @@
also easy to make and available in multiple languages.
</p>
-<div class="headerLine">
+<div class="headerLine" style="clear:both">
<h2 id="cross-promote-from-your-other-apps">
Cross-Promote from Your Other Apps
</h2>
@@ -262,7 +262,7 @@
Sign up for an AdMob account</a> to get started.
</p>
-<div class="headerLine">
+<div class="headerLine" style="clear:both">
<h2 id="maximize-your-marketing-spend">
Maximize your Marketing Spend
</h2>
@@ -285,7 +285,7 @@
platforms simultaneously helps you maximize your return on investment.
</p>
-<div class="headerLine">
+<div class="headerLine" style="clear:both">
<h2 id="related-resources">
Related Resources
</h2>
diff --git a/docs/html/distribute/users/your-listing.jd b/docs/html/distribute/users/your-listing.jd
index f869950..5d2f885 100644
--- a/docs/html/distribute/users/your-listing.jd
+++ b/docs/html/distribute/users/your-listing.jd
@@ -87,11 +87,10 @@
<p>
Choosing the right featured image is important, it needs to convey as much
about the features of your apps and what makes them special as possible,
- without being cluttered and confusing. Check out the <a href=
- "http://android-developers.blogspot.com/">Android Developers blog</a> post
- for more <a href=
- "http://android-developers.blogspot.com/2011/10/android-market-featured-image.html">
- Featured-Image Guidelines</a>.
+ without being cluttered and confusing. To get started with the featured
+ image specs, read the <a
+ href="https://support.google.com/googleplay/android-developer/answer/1078870">featured
+ image guidelines</a> in the Help Center.
</p>
<div class="headerLine">
diff --git a/docs/html/google/gcm/ccs.jd b/docs/html/google/gcm/ccs.jd
index 1c7c802..2faf97f 100644
--- a/docs/html/google/gcm/ccs.jd
+++ b/docs/html/google/gcm/ccs.jd
@@ -81,10 +81,14 @@
<p>The CCS XMPP endpoint runs at {@code gcm.googleapis.com:5235}. When testing
functionality (with non-production users), you should instead connect to
-{@code gcm-staging.googleapis.com:5236} (note the different port). Testing on
-staging (a smaller environment where the latest CCS builds run) is beneficial
-both for isolating real users from test code, as well as for early detection of
-unexpected behavior changes.</p>
+{@code gcm-preprod.googleapis.com:5236} (note the different port). Regular
+testing on preprod (a smaller environment where the latest CCS builds run) is
+beneficial both for isolating real users from test code, as well as for early
+detection of unexpected behavior changes. Note that a connection receives upstream
+messages destined for its GCM sender ID, regardless of which environment (gcm or
+gcm-preprod) it is connected to. Therefore, test code connecting to
+{@code gcm-preprod.googleapis.com:5236} should use a different GCM sender ID to
+avoid upstream messages from production traffic being sent over test connections.</p>
<p>The connection has two important requirements:</p>
diff --git a/docs/html/google/play/billing/billing_overview.jd b/docs/html/google/play/billing/billing_overview.jd
index 12f8c9a..1c20d78 100644
--- a/docs/html/google/play/billing/billing_overview.jd
+++ b/docs/html/google/play/billing/billing_overview.jd
@@ -7,11 +7,11 @@
<div id="qv">
<h2>Quickview</h2>
<ul>
- <li>Use In-app Billing to sell digital goods, including one-time items and
+ <li>Use In-app Billing to sell digital goods, including one-time items and
recurring subscriptions.</li>
- <li>Supported for any app published on Google Play. You only need a Google
+ <li>Supported for any app published on Google Play. You only need a Google
Play Developer Console account and a Google Wallet merchant account.</li>
- <li>Checkout processing is automatically handled by Google Play, with the
+ <li>Checkout processing is automatically handled by Google Play, with the
same look-and-feel as for app purchases.</li>
</ul>
<h2>In this document</h2>
@@ -24,18 +24,18 @@
</li>
<li><a href="#console">Google Play Developer Console</a></li>
<li><a href="#checkout">Google Play Purchase Flow</a></li>
- <li><a href="#samples">Sample App</a></li>
+ <li><a href="#samples">Sample App</a></li>
<li><a href="#migration">Migration Considerations</a></li>
</ol>
<h2>Related Samples</h2>
<ol>
<li><a href="{@docRoot}training/in-app-billing/preparing-iab-app.html#GetSample">Sample Application (V3)</a></li>
- </ol>
+ </ol>
</div>
</div>
-<p>This documentation describes the fundamental In-app Billing components and
-features that you need to understand in order to add In-app
+<p>This documentation describes the fundamental In-app Billing components and
+features that you need to understand in order to add In-app
Billing features into your application.</p>
<p class="note"><b>Note</b>: Ensure that you comply with applicable laws in the countries where you
@@ -49,130 +49,132 @@
</p>
<h2 id="api">In-app Billing API</h2>
-<p>Your application accesses the In-app Billing service using an API that is
-exposed by the Google Play app that is installed on the device. The Google Play
-app then conveys billing requests and responses between your
-application and the Google Play server. In practice, your application never
-directly communicates with the Google Play server. Instead, your application
-sends billing requests to the Google Play application over interprocess
-communication (IPC) and receives responses from the Google Play app.
-Your application does not manage any network connections between itself and
+<p>Your application accesses the In-app Billing service using an API that is
+exposed by the Google Play app that is installed on the device. The Google Play
+app then conveys billing requests and responses between your
+application and the Google Play server. In practice, your application never
+directly communicates with the Google Play server. Instead, your application
+sends billing requests to the Google Play application over interprocess
+communication (IPC) and receives responses from the Google Play app.
+Your application does not manage any network connections between itself and
the Google Play server.</p>
-<p>In-app Billing can be implemented only in applications that you publish
-through Google Play. To complete in-app purchase requests, the Google Play app
+<p>In-app Billing can be implemented only in applications that you publish
+through Google Play. To complete in-app purchase requests, the Google Play app
must be able to access the Google Play server over the network.</p>
-<p>In-app billing Version 3 is the latest version, and maintains very broad
-compatibility across the range of Android devices. In-app Billing Version 3 is
-supported on devices running Android 2.2 or higher that have the latest version
+<p>In-app billing Version 3 is the latest version, and maintains very broad
+compatibility across the range of Android devices. In-app Billing Version 3 is
+supported on devices running Android 2.2 or higher that have the latest version
of the Google Play store installed (<a href="{@docRoot}about/dashboards/index.html">a vast majority</a> of active devices).</p>
<h4>Version 3 features</h4>
<ul>
-<li>Requests are sent through a streamlined API that allows you to easily request
-product details from Google Play, order in-app products, and quickly restore
+<li>Requests are sent through a streamlined API that allows you to easily request
+product details from Google Play, order in-app products, and quickly restore
items based on users' product ownership</li>
-<li>Order information is synchronously propagated to the device on purchase
+<li>Order information is synchronously propagated to the device on purchase
completion</li>
-<li>All purchases are “managed” (that is, Google Play keeps track of the user's
-ownership of in-app products). The user cannot own multiple copies of an in-app
+<li>All purchases are “managed” (that is, Google Play keeps track of the user's
+ownership of in-app products). The user cannot own multiple copies of an in-app
item; only one copy can be owned at any point in time</li>
-<li>Purchased items can be consumed. When consumed, the item reverts to the
+<li>Purchased items can be consumed. When consumed, the item reverts to the
"unowned" state and can be purchased again from Google Play</li>
<li>Provides support for <a
href="{@docRoot}google/play/billing/billing_subscriptions.html">subscriptions</a></li>
</ul>
-<p>For details about other versions of In-app Billing, see the
+<p>For details about other versions of In-app Billing, see the
<a href="{@docRoot}google/play/billing/versions.html">Version Notes</a>.</p>
<h2 id="products">In-app Products</h2>
-<p>In-app products are the digital goods that you offer for sale from inside your
-application to users. Examples of digital goods includes in-game currency,
-application feature upgrades that enhance the user experience, and new content
+<p>In-app products are the digital goods that you offer for sale from inside your
+application to users. Examples of digital goods includes in-game currency,
+application feature upgrades that enhance the user experience, and new content
for your application.</p>
-<p>You can use In-app Billing to sell only digital content.
-You cannot use In-app Billing to sell physical goods, personal services, or
-anything that requires physical delivery. Unlike with priced applications, once
+<p>You can use In-app Billing to sell only digital content.
+You cannot use In-app Billing to sell physical goods, personal services, or
+anything that requires physical delivery. Unlike with priced applications, once
the user has purchased an in-app product there is no refund window.</p>
-<p>Google Play does not provide any form of content delivery. You are
-responsible for delivering the digital content that you sell in your
-applications. In-app products are always explicitly associated with one and
-only one app. That is, one application cannot purchase an in-app product
+<p>Google Play does not provide any form of content delivery. You are
+responsible for delivering the digital content that you sell in your
+applications. In-app products are always explicitly associated with one and
+only one app. That is, one application cannot purchase an in-app product
published for another app, even if they are from the same developer.</p>
<h3 id="prodtypes">Product types</h3>
-<p>In-app Billing supports different product types to give you flexibility in
-how you monetize your application. In all cases, you define your products using
+<p>In-app Billing supports different product types to give you flexibility in
+how you monetize your application. In all cases, you define your products using
the Google Play Developer Console.</p>
-<p>You can specify these types of products for your In-app Billing application
-— <em>managed in-app products</em> and <em>subscriptions</em>. Google Play
-handles and tracks ownership for in-app products and subscriptions on your
+<p>You can specify these types of products for your In-app Billing application
+— <em>managed in-app products</em> and <em>subscriptions</em>. Google Play
+handles and tracks ownership for in-app products and subscriptions on your
application on a per user account basis. <a href="{@docRoot}google/play/billing/api.html#producttypes">Learn more about the product types supported by In-app Billing Version 3</a>.</p>
<h2 id="console">Google Play Developer Console</h2>
-<p>The Developer Console is where you can publish your
-In-app Billing application, and manage the various in-app products that are
+<p>The Developer Console is where you can publish your
+In-app Billing application, and manage the various in-app products that are
available for purchase from your application.</p>
-<p>You can create a product list of
-digital goods that are associated with your application, including items for
-one-time purchase and recurring subscriptions. For each item, you can define
-information such as the item’s unique product ID (also called its SKU), product
-type, pricing, description, and how Google Play should handle and track
+<p>You can create a product list of
+digital goods that are associated with your application, including items for
+one-time purchase and recurring subscriptions. For each item, you can define
+information such as the item’s unique product ID (also called its SKU), product
+type, pricing, description, and how Google Play should handle and track
purchases for that product.</p>
-<p>You can also create test accounts to authorize
+<p>You can also create test accounts to authorize
access for testing applications that are unpublished.</p>
-<p>To learn how to use the Developer Console to configure your in-app
-products and product list, see
-<a href="{@docRoot}google/play/billing/billing_admin.html">Administering
+<p>To learn how to use the Developer Console to configure your in-app
+products and product list, see
+<a href="{@docRoot}google/play/billing/billing_admin.html">Administering
In-app Billing</a>.</p>
<h2 id="checkout">Google Play Purchase Flow</h2>
-<p>Google Play uses the same checkout backend service as is used for application
+<p>Google Play uses the same checkout backend service as is used for application
purchases, so your users experience a consistent and familiar purchase flow.</p>
<p class="note"><strong>Important:</strong> You must have a Google Wallet
merchant account to use the In-app Billing service on Google Play.</p>
-<p>To initiate a purchase, your application sends a billing request for a
-specific in-app product. Google Play then handles all of the checkout details for
-the transaction, including requesting and validating the form of payment and
-processing the financial transaction.</p>
-<p>When the checkout process is complete,
-Google Play sends your application the purchase details, such as the order
-number, the order date and time, and the price paid. At no point does your
-application have to handle any financial transactions; that role is provided by
+<p>To initiate a purchase, your application sends a billing request for a
+specific in-app product. Google Play then handles all of the checkout details for
+the transaction, including requesting and validating the form of payment and
+processing the financial transaction.</p>
+<p>When the checkout process is complete,
+Google Play sends your application the purchase details, such as the order
+number, the order date and time, and the price paid. At no point does your
+application have to handle any financial transactions; that role is provided by
Google Play.</p>
<h2 id="samples">Sample Application</h2>
-<p>To help you integrate In-app Billing into your application, the Android SDK
-provides a sample application that demonstrates how to sell in-app products and subscriptions
+<p>To help you integrate In-app Billing into your application, the Android SDK
+provides a sample application that demonstrates how to sell in-app products and subscriptions
from inside an app.</p>
-<p>The <a href="{@docRoot}training/in-app-billing/preparing-iab-app.html#GetSample">TrivialDrive sample for the Version 3 API</a> sample shows how to use the In-app Billing Version 3 API
-to implement in-app product and subscription purchases for a driving game. The
-application demonstrates how to send In-app Billing requests, and handle
-synchronous responses from Google Play. The application also shows how to record
-item consumption with the API. The Version 3 sample includes convenience classes
-for processing In-app Billing operations as well as perform automatic signature
+<p>The <a href="{@docRoot}training/in-app-billing/preparing-iab-app.html#GetSample">TrivialDrive sample for the Version 3 API</a> sample shows how to use the In-app Billing Version 3 API
+to implement in-app product and subscription purchases for a driving game. The
+application demonstrates how to send In-app Billing requests, and handle
+synchronous responses from Google Play. The application also shows how to record
+item consumption with the API. The Version 3 sample includes convenience classes
+for processing In-app Billing operations as well as perform automatic signature
verification.</p>
-<p class="caution"><strong>Recommendation</strong>: Make sure to obfuscate the
+<p class="caution"><strong>Recommendation</strong>: Make sure to obfuscate the
code in your application before you publish it. For more information, see
-<a href="{@docRoot}google/play/billing/billing_best_practices.html">Security
+<a href="{@docRoot}google/play/billing/billing_best_practices.html">Security
and Design</a>.</p>
<h2 id="migration">Migration Considerations</h2>
-<p>If you have an existing In-app Billing implementation that uses Version 2 or
-earlier, it is strongly recommended that you migrate to <a href="{@docRoot}google/play/billing/api.html">In-app Billing Version 3</a> at your earliest convenience.</p>
+<p>The In-app Billing Version 2 API is deprecated and will be discontinued in January 2015.
+If you have an existing In-app Billing implementation that uses API Version 2 or
+earlier, you must migrate to <a href="{@docRoot}google/play/billing/api.html">In-app Billing Version
+3</a>.</p>
<p>If you have published apps selling in-app products, note that:</p>
<ul>
-<li>Managed items and subscriptions that you have previously defined in the Developer Console will
+<li>Managed items and subscriptions that you have previously defined in the Developer Console will
work with Version 3 as before.</li>
-<li>Unmanaged items that you have defined for existing applications will be
-treated as managed products if you make a purchase request for these items using
-the Version 3 API. You do not need to create a new product entry in Developer
-Console for these items, and you can use the same product IDs to purchase these
-items. They will still continue to be treated as unmanaged items if you make a
-purchase request for them using the Version 2 or earlier API.
+<li>Unmanaged items that you have defined for existing applications will be
+treated as managed products if you make a purchase request for these items using
+the Version 3 API. You do not need to create a new product entry in Developer
+Console for these items, and you can use the same product IDs to purchase these
+items. They will still continue to be treated as unmanaged items if you make a
+purchase request for them using the Version 2 or earlier API.
</ul>
diff --git a/docs/html/google/play/billing/billing_subscriptions.jd b/docs/html/google/play/billing/billing_subscriptions.jd
index 2b78ab3..b9b77df 100644
--- a/docs/html/google/play/billing/billing_subscriptions.jd
+++ b/docs/html/google/play/billing/billing_subscriptions.jd
@@ -11,25 +11,32 @@
<div id="qv">
<h2>Quickview</h2>
<ul>
- <li>Users purchase your subscriptions from inside your apps, rather than
-directly from Google Play.</li>
- <li>Subscriptions let you sell products with automated, recurring billing
-(monthly or annual).</li>
- <li>You can offer a configurable trial period for any subscription.</li>
-
+ <li>Subscriptions let you sell products with automated, recurring billing
+ at a variety of intervals.</li>
+ <li>You can offer a configurable trial period for monthly and
+ annual subscriptions.</li>
+ <li>You can manage subscriptions through the Developer Console, or by using
+ the
+ <a href="https://developers.google.com/android-publisher/">Google Play
+ Developer API</a>.</li>
+ <li>Users purchase your subscriptions from inside your apps, rather than
+ directly from Google Play.</li>
+ <li>You can defer billing for a particular user's subscription, to manage
+ accounts or offer rewards.</li>
</ul>
<h2>In this document</h2>
<ol>
- <li><a href="#overview">Overview</a></li>
+ <li><a href="#overview">Overview of Subscriptions</a></li>
<li><a href="#administering">Configuring Subscriptions Items</a></li>
- <li><a href="#cancellation">Cancellation</a></li>
- <li><a href="#payment">Payment Processing</a></li>
+ <li><a href="#cancellation">Subscription Cancellation</a></li>
+ <li><a href="#payment">Payment Processing and Policies</a></li>
<li><a href="#strategies">Purchase Verification Strategies</a></li>
+ <li><a href="#play-dev-api">Google Play Developer API</a></li>
</ol>
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}google/play/billing/billing_integrate.html#Subs">Implementing Subscriptions (V3)</a></li>
- <li><a href="https://developers.google.com/android-publisher/v1_1/">Google Play Android Developer API</a></li>
+ <li><a href="https://developers.google.com/android-publisher/">Google Play Developer API</a></li>
</ol>
</div>
</div>
@@ -44,14 +51,15 @@
<h2 id="overview">Overview of Subscriptions</h2>
<p>A <em>subscription</em> is a product type offered in In-app Billing that
lets you sell content, services, or features to users from inside your app with
-recurring monthly or annual billing. You can sell subscriptions to almost any
+recurring, automated billing at the interval you specify. You can sell subscriptions to almost
+any
type of digital content, from any type of app or game.</p>
<p>As with other in-app products, you configure and publish subscriptions using
the Developer Console and then sell them from inside apps installed on
Android devices. In the Developer console, you create subscription
products and add them to a product list, then set a price and optional trial
-period for each, choose a billing interval (monthly or annual), and then
+period for each, choose a billing interval, and then
publish. For more information about using the Developer Console, see
<a href="#administering">Configuring Subscription Items</a>.</p>
@@ -63,17 +71,17 @@
<img src="{@docRoot}images/in-app-billing/v3/billing_subscription_v3.png" style="float:right; border:4px solid ddd;">
-<p>After users have purchase subscriptions, they can view the subscriptions and
+<p>After users have purchased subscriptions, they can view the subscriptions and
cancel them from the <strong>My Apps</strong> screen in the Play Store app or
from the app's product details page in the Play Store app. For more information
about handling user cancellations, see <a href="#cancellation">Subscription Cancellation</a>.</p>
-<p>In adddition to client-side API calls, you can use the server-side API for
+<p>In addition to client-side API calls, you can use the server-side API for
In-app Billing to provide subscription purchasers with extended access to
content (for example, from your web site or another service).
The server-side API lets you validate the status of a subscription when users
sign into your other services. For more information about the API, see <a
-href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Purchase Status API</a>. </p>
+href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Google Play Developer API</a>. </p>
<p>You can also build on your existing external subscriber base from inside your
Android apps.</p>
@@ -102,8 +110,10 @@
subscriptions, see the <a href="{@docRoot}google/play/billing/versions.html#Subs">Version Notes</a>.</p>
<h2 id="administering">Configuring Subscription Items</h2>
-<p>To create and manage subscriptions, use the Developer Console to set up a
-product list for the app then configure these attributes for each subscription
+
+<p>To create and manage subscriptions, you can use the Developer Console to set
+up a
+product list for the app, then configure these attributes for each subscription
product:</p>
<ul>
@@ -113,8 +123,8 @@
<li>Language: The default language for displaying the subscription</li>
<li>Title: The title of the subscription product</li>
<li>Description: Details that tell the user about the subscription</li>
-<li>Price: USD price of subscription per recurrence</li>
-<li>Recurrence: monthly or yearly</li>
+<li>Price: Default price of subscription per recurrence</li>
+<li>Recurrence: Interval of billing recurrence</li>
<li>Additional currency pricing (can be auto-filled)</li>
</ul>
@@ -122,6 +132,10 @@
see <a href="{@docRoot}google/play/billing/billing_admin.html">Administering
In-app Billing</a>.</p>
+<p>You can also create and manage subscriptions using the
+<a href="{@docRoot}google/play/billing/gp-purchase-status-api.html">
+Google Play Developer API</a>.</p>
+
<h3 id="pricing">Subscription pricing</h3>
<p>When you create a subscription in the Developer Console, you can set a price
@@ -139,20 +153,30 @@
<h3 id="user-billing">User billing</h3>
<p>In the Developer Console, you can configure subscription products with
-automated recurring billing at either of two intervals:</p>
+automated recurring billing at your choice of intervals:</p>
<ul>
<li>Monthly — Google Play bills the customer’s Google Wallet account at
the time of purchase and monthly subsequent to the purchase date (exact billing
- intervals can vary slightly over time)</li>
+ intervals can vary slightly over time).</li>
<li>Annually — Google Play bills the customer's Google Wallet account at
the time of purchase and again on the same date in subsequent years.</li>
+
+ <li>Seasonal — Google Play bills the customer's Google Wallet account at
+ the beginning of each "season" (you specify the season beginning and end
+ dates). This
+ is intended for annual purchases of seasonal content (such as sports-related
+ content). The subscription runs through the end of the season, and restarts
+ the next year at the start of the season.</li>
+
</ul>
<p>Billing continues indefinitely at the interval and price specified for the
subscription. At each subscription renewal, Google Play charges the user account
-automatically, then notifies the user of the charges afterward by email. Billing
-cycles will always match subscription cycles, based on the purchase date.</p>
+automatically, then notifies the user of the charges afterward by email. For
+monthly and annual subscriptions, billing cycles will always match subscription
+cycles, based on the purchase date. (Seasonal subscriptions are charged
+annually, on the first day of the season.)</p>
<p>Over the life of a subscription, the form of payment billed remains the same
— Google Play always bills the same form of payment (such as credit card
@@ -164,7 +188,7 @@
API. Your apps can store the token locally or pass it to your backend servers,
which can then use it to validate or cancel the subscription remotely using the
<a
-href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Purchase Status API</a>.</p>
+href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Google Play Developer API</a>.</p>
<p>If a recurring payment fails (for example, because the customer’s credit
card has become invalid), the subscription does not renew. How your app is
@@ -182,18 +206,57 @@
billing errors that may occur. Your backend servers can use the server-side API
to query and update your records and follow up with customers directly, if needed.</p>
+<h3 id="deferred-billing">Deferred Billing</h3>
+
+<p>Using the
+<a href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Google
+Play Developer API</a>, you can defer the next billing date for a
+subscriber. The user continues to be subscribed to the content, and has full
+access to it, but is not charged during the deferral period. This allows you
+to do things like:</p>
+
+<ul>
+ <li>Give users free access as part of a bundle or a special offer (for
+ example, giving free access to web content to users who subscribe to a
+ print magazine)</li>
+ <li>Give free access to customers as a goodwill gesture</li>
+</ul>
+
+<p>The longest you can defer billing is for one year per call. Of course, you
+can call the API again before the year is up to defer billing further.</p>
+
+<p>For example, Darcy has a monthly subscription to online content for the
+<em>Fishing Gentleman</em> app. He is normally
+billed £1.25 on the first of each month.
+On March 10, he participates in an online survey for the app publisher. The
+publisher rewards him by deferring his next payment until June 1. Darcy is not
+charged on April 1 or May 1, but still has access to the content as normal. On
+June 1, he is charged his normal £1.25 subscription fee.</p>
+
+<p class="note"><strong>Note:</strong> The API always defers the billing date
+by a whole number of days. If you request a deferral period that includes a
+fractional number of days, the API rounds the period up to the next full day.
+For example, if a user's subscription is set to renew on 15 June 2015 at
+14:00:00 UTC, and you use the API to defer the renewal date to 15 August 2015 at
+02:00:00 UTC, the API will round up to the next full day and set the renewal
+date to 15 August 2015 14:00:00 UTC.</p>
+
+<p>You can also offer free trials to new subscribers, as described in
+<a href="#trials">Free trials</a>.</p>
+
<h3 id="trials">Free trials</h3>
<p>In the Developer Console, you can set up a free trial period that lets users
try your subscription content before buying it. The trial period runs for the
period of time that you set and then automatically converts to a full
subscription managed according to the subscription's billing interval and
-price.</p>
+price. Free trials are supported for monthly and annual subscriptions only, and are not supported for seasonal subscriptions.</p>
<p>To take advantage of a free trial, a user must "purchase" the full
subscription through the standard In-app Billing flow, providing a valid form of
payment to use for billing and completing the normal purchase transaction.
-However, the user is not charged any money, since the initial period corresponds
+However, the user is not charged any money, because the initial period
+corresponds
to the free trial. Instead, Google Play records a transaction of $0.00 and the
subscription is marked as purchased for the duration of the trial period or
until cancellation. When the transaction is complete, Google Play notifies users
@@ -220,8 +283,10 @@
period per subscription product.</p>
<h3 id="publishing">Subscription publishing</h3>
+
<p>When you have finished configuring your subscription product details in the
-Developer Console, you can publish the subscription in the app product list.</p>
+Developer Console or via the API,
+you can publish the subscription in the app product list.</p>
<p>In the product list, you can add subscriptions, in-app products, or both. You
can add multiple subscriptions that give access to different content or
@@ -263,10 +328,13 @@
<p class="caution"><strong>Important:</strong> In all cases, you must continue
to offer the content that your subscribers have purchased through their
-subscriptions, for as long any users are able to access it. That is, you must
-not remove any subscriber’s content while any user still has an active
+subscriptions, as long any user is able to access it. That is, you must
+not remove any content while any user still has an active
subscription to it, even if that subscription will terminate at the end of the
-current billing cycle. Removing content that a subscriber is entitled to access
+current billing cycle. Alternatively, you can use the <a href="#refunds">refund
+and revoke</a> API to revoke each subscriber's subscription (one by one) and
+refund their subscription payments.
+Removing content that any subscriber is entitled to access
will result in penalties. Please see the <a
href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=140504">policies document</a> for more information. </p>
@@ -280,19 +348,26 @@
screen of the Play Store app. If the user chooses to cancel the uninstallation,
the app and subscriptions remain as they were.</p>
-<h3 id="refunds">Refunds</h3>
+<h3 id="refunds">Refunding and revoking subscriptions</h3>
-<p>With subscriptions, Google Play does not provide a refund window, so users
-will need to contact you directly to request a refund.
+<p>With subscriptions, Google Play does not provide a refund window, so users
+will need to request a refund. They can request a refund from the <strong>My
+Orders</strong> page in the Play Store, or by contacting you directly.</p>
-<p>If you receive requests for refunds, you can use the server-side API to
-cancel the subscription or verify that it is already cancelled. However, keep in
-mind that Google Play considers cancelled subscriptions valid until the end of
-their current billing cycles, so even if you grant a refund and cancel the
-subscription, the user will still have access to the content.
+<p>If you receive requests for refunds, you can use the
+<a href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Google Play
+Developer API</a> or the Merchant Center to cancel the subscription, verify that it
+is already cancelled, or refund the user's payment without cancelling it. You
+can also use the
+<a href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Google
+Play Developer API</a> to <em>refund and revoke</em> a
+user's subscription. If you refund and revoke a subscription, the user's
+subscription is immediately cancelled, and the user's most recent subscription
+payment is refunded. (If you want to refund more than the most recent payment,
+you can process additional refunds through the Merchant Center.)</p>
-<p class="caution"><strong>Important:</strong> Partial refunds for canceled
-subscriptions are not available at this time.</p>
+<p class="caution"><strong>Important:</strong> Partial refunds are not available
+at this time.</p>
<h2 id="payment">Payment Processing and Policies</h2>
@@ -317,9 +392,9 @@
each recurring transaction by appending an integer as follows: </p>
<p><span style="color:#777"><code style="color:#777">12999556515565155651.5565135565155651</code> (base order number)</span><br />
-<code>12999556515565155651.5565135565155651..0</code> (initial purchase orderID)<br />
-<code>12999556515565155651.5565135565155651..1</code> (first recurrence orderID)<br />
-<code>12999556515565155651.5565135565155651..2</code> (second recurrence orderID)<br />
+<code>12999556515565155651.5565135565155651..0</code> (first recurrence orderID)<br />
+<code>12999556515565155651.5565135565155651..1</code> (second recurrence orderID)<br />
+<code>12999556515565155651.5565135565155651..2</code> (third recurrence orderID)<br />
...<br /></p>
<p>Google Play provides the order number as the value of the
@@ -334,19 +409,28 @@
<p>To verify a purchase, the app passes the purchase token and other details up
to your backend servers, which verifies them directly with Google Play using the
-Purchase Status API. If the backend server determines that the purchase is
+Google Play Developer API. If the backend server determines that the purchase is
valid, it notifies the app and grants access to the content.</p>
<p>Keep in mind that users will want the ability to use your app at any time,
including when there may be no network connection available. Make sure that your
approach to purchase verification accounts for the offline use-case.</p>
-<h2 id="play-dev-api">Google Play Android Developer API</h2>
+<h2 id="play-dev-api">Google Play Developer API</h2>
-<p>Google Play offers an HTTP-based API that lets you remotely query the
-validity of a specific subscription at any time or cancel a subscription. The
-API is designed to be used from your backend servers as a way of securely
+<p>Google Play offers an HTTP-based API that lets you perform such tasks as:</p>
+ <ul>
+ <li>Remotely query the validity of a specific subscription at any time</li>
+ <li>Cancel a subscription</li>
+ <li>Defer a subscription's next billing date</li>
+ <li>Refund a subscription payment without cancelling the subscription</li>
+ <li>Refund and revoke a subscription</li>
+ </ul>
+
+<p>The API is designed to be used from your backend servers as a way of securely
managing subscriptions, as well as extending and integrating subscriptions with
other services.</p>
-<p>For complete information, see <a href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Purchase Status API</a>.</p>
+<p>For complete information, see
+<a href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Google Play
+Developer API</a>.</p>
diff --git a/docs/html/google/play/billing/index.jd b/docs/html/google/play/billing/index.jd
index 875271fe..bdbf5c7 100644
--- a/docs/html/google/play/billing/index.jd
+++ b/docs/html/google/play/billing/index.jd
@@ -14,21 +14,35 @@
<div class="sidebox">
<h2><strong>New in In-App Billing</strong></h2>
<ul>
+ <li><strong>IAB v2 shutdown</strong>—In-app Billing v2 API is deprecated and will be shut down in January 2015. If your app is still using In-app Billing v2, please migrate to the v3 API as soon as possible.</li>
+ <li><strong>Seasonal subscriptions</strong>—You can now set up a
+ recurring <a href="billing_subscriptions.html#user-billing">seasonal
+ subscription</a> that starts and ends on the same date each year (for
+ example, a sports subscription that starts every September 1 and ends every
+ April 10).</li>
+ <li><strong>Deferred subscription billing</strong>—You can
+ <a href="billing_subscriptions.html#deferred-billing">defer</a> a
+ subscriber's next billing date until the date you choose. The user still has
+ access to the content but is not charged during the deferral period.</li>
<li><strong>Google Play Developer API</strong>—The
<a href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Google
Play Developer API</a> allows you to perform a number of publishing and
app-management tasks. It includes the functionality previously known as the
<em>Purchase Status API.</em> </li>
+ <li><strong>Refund/Revoke subscription</strong>—You can use the
+ Google Play Developer API to <a href="billing_subscriptions.html#refunds">refund
+ and revoke</a> a user's subscription. If you do this, the user's
+ subscription ends
+ immediately, and his or her most recent subscription payment is
+ refunded.</li>
<li><strong>In-app Billing Version 3</strong>—The <a href="{@docRoot}google/play/billing/api.html">latest version</a> of In-app Billing features a synchronous API that is easier to implement and lets you manage in-app products and subscriptions more effectively.</li>
- <li><strong>Subscriptions now supported in Version 3</strong>—You can query and launch purchase flows for subscription items using the V3 API.</li>
- <li><strong>Free trials</strong>—You can now offer users a configurable <a href="/google/play/billing/v2/billing_subscriptions.html#trials">free trial period</a> for your in-app subscriptions. You can set up trials with a simple change in the Developer Console—no change to your app code is needed.</li>
</ul>
</div>
</div>
<ul>
<li>Standard in-app products (one-time billing), or</li>
-<li>Subscriptions, (recurring, automated billing)</li>
+<li>Subscriptions (recurring, automated billing)</li>
</ul>
<p>When you use the in-app billing service to sell an item,
diff --git a/docs/html/google/play/billing/v2/api.jd b/docs/html/google/play/billing/v2/api.jd
index 9501555..36a9017 100644
--- a/docs/html/google/play/billing/v2/api.jd
+++ b/docs/html/google/play/billing/v2/api.jd
@@ -2,7 +2,28 @@
excludeFromSuggestions=true
@jd:body
-<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">In-app Billing Version 2 is superseded. Please <a href="{@docRoot}google/play/billing/billing_overview.html#migration">migrate to Version 3</a> at your earliest convenience.</div>
+<p class="caution" style=
+"background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">
+ The <strong>In-app Billing Version 2 API</strong> has been deprecated in
+ favor of the Version 3 API. If your app is using In-app Billing, please
+ <strong>make sure that it is using the Version 3 API</strong>. If your app is
+ still using the Version 2 API, you must <strong>migrate to the Version 3 API
+ as soon as possible</strong>.<br>
+ <br>
+ We plan to turn off the In-app Billing Version 2 service on <strong>January
+ 27, 2015</strong>, after which time users will <strong>no longer be able to
+ purchase in-app items and subscriptions through the Version 2 API</strong>.
+ We strongly encourage and recommend you migrate your apps to use Version 3
+ API by November 2014, to provide ample time for users to update their apps to
+ the new version.<br>
+ <br>
+ For more information, please see the <a href=
+ "http://support.google.com/googleplay/android-developer/answer/6090268">Help Center
+ article</a>. For common questions about transitioning your implementation to
+ In-app Billing Version 3, please see <a href=
+ "{@docRoot}google/play/billing/billing_overview.html#migration">Migration
+ Considerations</a>.
+</p>
<div id="qv-wrapper" style="margin-top:0;">
<div id="qv">
diff --git a/docs/html/google/play/billing/v2/billing_integrate.jd b/docs/html/google/play/billing/v2/billing_integrate.jd
index 5eb17d5..c264271 100644
--- a/docs/html/google/play/billing/v2/billing_integrate.jd
+++ b/docs/html/google/play/billing/v2/billing_integrate.jd
@@ -2,7 +2,28 @@
excludeFromSuggestions=true
@jd:body
-<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">In-app Billing Version 2 is superseded. Please <a href="{@docRoot}google/play/billing/billing_overview.html#migration">migrate to Version 3</a> at your earliest convenience.</div>
+<p class="caution" style=
+"background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">
+ The <strong>In-app Billing Version 2 API</strong> has been deprecated in
+ favor of the Version 3 API. If your app is using In-app Billing, please
+ <strong>make sure that it is using the Version 3 API</strong>. If your app is
+ still using the Version 2 API, you must <strong>migrate to the Version 3 API
+ as soon as possible</strong>.<br>
+ <br>
+ We plan to turn off the In-app Billing Version 2 service on <strong>January
+ 27, 2015</strong>, after which time users will <strong>no longer be able to
+ purchase in-app items and subscriptions through the Version 2 API</strong>.
+ We strongly encourage and recommend you migrate your apps to use Version 3
+ API by November 2014, to provide ample time for users to update their apps to
+ the new version.<br>
+ <br>
+ For more information, please see the <a href=
+ "http://support.google.com/googleplay/android-developer/answer/6090268">Help Center
+ article</a>. For common questions about transitioning your implementation to
+ In-app Billing Version 3, please see <a href=
+ "{@docRoot}google/play/billing/billing_overview.html#migration">Migration
+ Considerations</a>.
+</p>
<div id="qv-wrapper" style="margin-top:0;">
<div id="qv">
<h2>In this document</h2>
diff --git a/docs/html/google/play/billing/v2/billing_reference.jd b/docs/html/google/play/billing/v2/billing_reference.jd
index 4587dee..32e00cf 100644
--- a/docs/html/google/play/billing/v2/billing_reference.jd
+++ b/docs/html/google/play/billing/v2/billing_reference.jd
@@ -2,7 +2,28 @@
excludeFromSuggestions=true
@jd:body
-<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">In-app Billing Version 2 is superseded. Please <a href="{@docRoot}google/play/billing/billing_overview.html#migration">migrate to Version 3</a> at your earliest convenience.</div>
+<p class="caution" style=
+"background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">
+ The <strong>In-app Billing Version 2 API</strong> has been deprecated in
+ favor of the Version 3 API. If your app is using In-app Billing, please
+ <strong>make sure that it is using the Version 3 API</strong>. If your app is
+ still using the Version 2 API, you must <strong>migrate to the Version 3 API
+ as soon as possible</strong>.<br>
+ <br>
+ We plan to turn off the In-app Billing Version 2 service on <strong>January
+ 27, 2015</strong>, after which time users will <strong>no longer be able to
+ purchase in-app items and subscriptions through the Version 2 API</strong>.
+ We strongly encourage and recommend you migrate your apps to use Version 3
+ API by November 2014, to provide ample time for users to update their apps to
+ the new version.<br>
+ <br>
+ For more information, please see the <a href=
+ "http://support.google.com/googleplay/android-developer/answer/6090268">Help Center
+ article</a>. For common questions about transitioning your implementation to
+ In-app Billing Version 3, please see <a href=
+ "{@docRoot}google/play/billing/billing_overview.html#migration">Migration
+ Considerations</a>.
+</p>
<div id="qv-wrapper" style="margin-top:0;">
<div id="qv">
<h2>In this document</h2>
diff --git a/docs/html/google/play/billing/v2/billing_subscriptions.jd b/docs/html/google/play/billing/v2/billing_subscriptions.jd
index f8051a9..01e39ac 100644
--- a/docs/html/google/play/billing/v2/billing_subscriptions.jd
+++ b/docs/html/google/play/billing/v2/billing_subscriptions.jd
@@ -2,7 +2,28 @@
excludeFromSuggestions=true
@jd:body
-<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">In-app Billing Version 2 is superseded. Please <a href="{@docRoot}google/play/billing/billing_overview.html#migration">migrate to Version 3</a> at your earliest convenience.</div>
+<p class="caution" style=
+"background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">
+ The <strong>In-app Billing Version 2 API</strong> has been deprecated in
+ favor of the Version 3 API. If your app is using In-app Billing, please
+ <strong>make sure that it is using the Version 3 API</strong>. If your app is
+ still using the Version 2 API, you must <strong>migrate to the Version 3 API
+ as soon as possible</strong>.<br>
+ <br>
+ We plan to turn off the In-app Billing Version 2 service on <strong>January
+ 27, 2015</strong>, after which time users will <strong>no longer be able to
+ purchase in-app items and subscriptions through the Version 2 API</strong>.
+ We strongly encourage and recommend you migrate your apps to use Version 3
+ API by November 2014, to provide ample time for users to update their apps to
+ the new version.<br>
+ <br>
+ For more information, please see the <a href=
+ "http://support.google.com/googleplay/android-developer/answer/6090268">Help Center
+ article</a>. For common questions about transitioning your implementation to
+ In-app Billing Version 3, please see <a href=
+ "{@docRoot}google/play/billing/billing_overview.html#migration">Migration
+ Considerations</a>.
+</p>
<div id="qv-wrapper" style="margin-top:0;">
<div id="qv">
<h2>In this document</h2>
diff --git a/docs/html/guide/components/images/google-action.png b/docs/html/guide/components/images/google-action.png
new file mode 100644
index 0000000..f716d3d
--- /dev/null
+++ b/docs/html/guide/components/images/google-action.png
Binary files differ
diff --git a/docs/html/guide/components/images/google-action_2x.png b/docs/html/guide/components/images/google-action_2x.png
new file mode 100644
index 0000000..81a349d
--- /dev/null
+++ b/docs/html/guide/components/images/google-action_2x.png
Binary files differ
diff --git a/docs/html/guide/components/images/voice-icon.png b/docs/html/guide/components/images/voice-icon.png
new file mode 100644
index 0000000..b2e9e85
--- /dev/null
+++ b/docs/html/guide/components/images/voice-icon.png
Binary files differ
diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd
index af9456d..ac61924 100644
--- a/docs/html/guide/components/intents-common.jd
+++ b/docs/html/guide/components/intents-common.jd
@@ -26,6 +26,8 @@
<li><a href="#Camera">Camera</a>
<ol>
<li><a href="#ImageCapture">Capture a picture or video and return it</a></li>
+ <li><a href="#CameraStill">Start a camera app in still image mode</a></li>
+ <li><a href="#CameraVideo">Start a camera app in video mode</a></li>
</ol>
</li>
<li><a href="#Contacts">Contacts/People App</a>
@@ -48,6 +50,20 @@
<li><a href="#OpenFile">Open a specific type of file</a></li>
</ol>
</li>
+ <li><a href="#Fitness">Fitness</a>
+ <ol>
+ <li><a href="#TrackRide">Start/Stop a bike ride</a></li>
+ <li><a href="#TrackRun">Start/Stop a run</a></li>
+ <li><a href="#TrackWorkout">Start/Stop a workout</a></li>
+ <li><a href="#ShowHR">Show heart rate</a></li>
+ <li><a href="#ShowStepCount">Show step count</a></li>
+ </ol>
+ </li>
+ <li><a href="#Local">Local Actions</a>
+ <ol>
+ <li><a href="#CallCar">Call a car</a></li>
+ </ol>
+ </li>
<li><a href="#Maps">Maps</a>
<ol>
<li><a href="#ViewMap">Show a location on a map</a></li>
@@ -80,6 +96,8 @@
<li><a href="#SearchWeb">Perform a web search</a></li>
</ol>
</li>
+ <li><a href="#AdbIntents">Verify Intents with the Android Debug Bridge</a></li>
+ <li><a href="#Now">Intents Fired by Google Now</a></li>
</ol>
<h2>See also</h2>
@@ -90,6 +108,46 @@
</div>
</div>
+<!-- Google Now box styles -->
+<style type="text/css">
+.now-box {
+ border-color: rgb(204,204,204);
+ border-style: solid;
+ border-width: 1px;
+ float: right;
+ margin: 0px 0px 20px 15px;
+ padding: 17px;
+ width: 200px;
+}
+.now-box li {
+ font-size: 13px;
+ font-style: italic;
+ margin-top: 0px;
+}
+.now-box ul {
+ margin-bottom: 0px;
+}
+.now-img {
+ width: 30px;
+ margin-bottom: 0px !important;
+}
+.now-img-cont {
+ float: left;
+ margin-right: 10px;
+}
+.now-title {
+ font-weight: bold;
+ margin-top: 7px;
+}
+.now-list {
+ font-size: 13px;
+ margin-bottom: 10px !important;
+ list-style-type: none;
+}
+.now-list li {
+ font-style: italic;
+}
+</style>
<p>An intent allows you to start an activity in another app by describing a simple
action you'd like to perform (such as "view a map" or "take a picture")
@@ -121,12 +179,17 @@
null, you should not use the intent and, if possible, you should disable the feature that invokes
the intent.</p>
-
<p>If you're not familiar with how to create intents or intent filters, you should first read
<a href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>.</p>
+<p>To learn how to fire the intents listed on this page from your development host, see
+<a href="#AdbIntents">Verify Intents with the Android Debug Bridge</a>.</p>
+<h4>Google Now</h4>
+<p><a href="http://www.google.com/landing/now/">Google Now</a> fires some of the intents listed
+on this page in response to voice commands. For more information, see
+<a href="#Now">Intents Fired by Google Now</a>.</p>
@@ -138,11 +201,25 @@
<h3 id="CreateAlarm">Create an alarm</h3>
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"set an alarm for 7 am"</li>
+ </ul>
+</div>
+
<p>To create a new alarm, use the {@link android.provider.AlarmClock#ACTION_SET_ALARM}
action and specify alarm details such as the time and message using extras defined below.</p>
<p class="note"><strong>Note:</strong> Only the hour, minutes, and message extras are available
-since Android 2.3 (API level 9). The other extras were added in later versions of the platform.</p>
+in Android 2.3 (API level 9) and higher. The other extras were added in later versions of the
+platform.</p>
<dl>
<dt><b>Action</b></dt>
@@ -221,6 +298,19 @@
<h3 id="CreateTimer">Create a timer</h3>
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"set timer for 5 minutes"</li>
+ </ul>
+</div>
+
<p>To create a countdown timer, use the {@link android.provider.AlarmClock#ACTION_SET_TIMER}
action and specify timer details such as the duration using extras defined below.</p>
@@ -509,6 +599,116 @@
+<h3 id="CameraStill">Start a camera app in still image mode</h3>
+
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"take a picture"</li>
+ </ul>
+</div>
+
+<p>To open a camera app in still image mode, use the {@link
+android.provider.MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA} action.</p>
+
+<dl>
+<dt><b>Action</b></dt>
+<dd>{@link android.provider.MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA}</dd>
+
+<dt><b>Data URI Scheme</b></dt>
+<dd>None</dd>
+
+<dt><b>MIME Type</b></dt>
+<dd>None</dd>
+
+<dt><b>Extras</b></dt>
+<dd>None</dd>
+</dl>
+
+
+<p><b>Example intent:</b></p>
+<pre>
+public void capturePhoto() {
+ Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivityForResult(intent);
+ }
+}
+</pre>
+
+<p><b>Example intent filter:</b></p>
+<pre>
+<activity ...>
+ <intent-filter>
+ <action android:name="android.media.action.STILL_IMAGE_CAMERA" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
+</pre>
+
+
+
+<h3 id="CameraVideo">Start a camera app in video mode</h3>
+
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"record a video"</li>
+ </ul>
+</div>
+
+<p>To open a camera app in video mode, use the {@link
+android.provider.MediaStore#INTENT_ACTION_VIDEO_CAMERA} action.</p>
+
+<dl>
+<dt><b>Action</b></dt>
+<dd>{@link android.provider.MediaStore#INTENT_ACTION_VIDEO_CAMERA}</dd>
+
+<dt><b>Data URI Scheme</b></dt>
+<dd>None</dd>
+
+<dt><b>MIME Type</b></dt>
+<dd>None</dd>
+
+<dt><b>Extras</b></dt>
+<dd>None</dd>
+</dl>
+
+
+<p><b>Example intent:</b></p>
+<pre>
+public void capturePhoto() {
+ Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA);
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivityForResult(intent);
+ }
+}
+</pre>
+
+<p><b>Example intent filter:</b></p>
+<pre>
+<activity ...>
+ <intent-filter>
+ <action android:name="android.media.action.VIDEO_CAMERA" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
+</pre>
+
+
+
<h2 id="Contacts">Contacts/People App</h2>
@@ -668,10 +868,10 @@
<p>There are primarily two ways to initially retrieve the contact's URI:</p>
<ul>
<li>Use the contact URI returned by the {@link android.content.Intent#ACTION_PICK},
- shown in the previous section (this does not require any app permissions).</li>
+ shown in the previous section (this approach does not require any app permissions).</li>
<li>Access the list of all contacts directly, as described in <a
href="{@docRoot}training/contacts-provider/retrieve-names.html">Retrieving a List of
- Contacts</a> (this requires the {@link android.Manifest.permission#READ_CONTACTS}
+ Contacts</a> (this approach requires the {@link android.Manifest.permission#READ_CONTACTS}
permission).</li>
</ul>
@@ -709,10 +909,10 @@
<p>There are primarily two ways to initially retrieve the contact URI:</p>
<ul>
<li>Use the contact URI returned by the {@link android.content.Intent#ACTION_PICK},
- shown in the previous section (this does not require any app permissions).</li>
+ shown in the previous section (this approach does not require any app permissions).</li>
<li>Access the list of all contacts directly, as described in <a
href="{@docRoot}training/contacts-provider/retrieve-names.html">Retrieving a List of
- Contacts</a> (this requires the {@link android.Manifest.permission#READ_CONTACTS}
+ Contacts</a> (this approach requires the {@link android.Manifest.permission#READ_CONTACTS}
permission).</li>
</ul>
@@ -802,7 +1002,6 @@
<h3 id="ComposeEmail">Compose an email with optional attachments</h3>
-
<p>To compose an email, use one of the below actions based on whether you'll include attachments,
and include email details such as the recipient and subject using the extra keys listed below.</p>
@@ -899,15 +1098,6 @@
-
-
-
-
-
-
-
-
-
<h2 id="Storage">File Storage</h2>
@@ -1153,6 +1343,410 @@
+<h2 id="Fitness">Fitness</h2>
+
+<h3 id="TrackRide">Start/Stop a bike ride</h3>
+
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"start cycling"</li>
+ <li>"start my bike ride"</li>
+ <li>"stop cycling"</li>
+ </ul>
+</div>
+
+<p>To track a bike ride, use the <code>"vnd.google.fitness.TRACK"</code> action with the
+<code>"vnd.google.fitness.activity/biking"</code> MIME type and set the <code>"actionStatus"</code>
+extra to <code>"ActiveActionStatus"</code> when starting and to <code>"CompletedActionStatus"</code>
+when stopping.</p>
+
+<dl>
+ <dt><b>Action</b></dt>
+ <dd><code>"vnd.google.fitness.TRACK"</code><dd>
+
+ <dt><b>Data URI</b></dt>
+ <dd>None</dd>
+
+ <dt><b>MIME Type</b></dt>
+ <dd><code>"vnd.google.fitness.activity/biking"</code></dd>
+
+ <dt><b>Extras</b></dt>
+ <dd>
+ <dl>
+ <dt><code>"actionStatus"</code></dt>
+ <dd>A string with the value <code>"ActiveActionStatus"</code> when starting and
+ <code>"CompletedActionStatus"</code> when stopping.</dd>
+ </dl>
+ </dd>
+</dl>
+
+
+<p><b>Example intent:</b></p>
+<pre>
+public void startBikeRide() {
+ Intent intent = new Intent("vnd.google.fitness.TRACK")
+ .setType("vnd.google.fitness.activity/biking")
+ .putExtra("actionStatus", "ActiveActionStatus");
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivity(intent);
+ }
+}
+</pre>
+
+
+<p><b>Example intent filter:</b></p>
+<pre>
+<activity ...>
+ <intent-filter>
+ <action android:name="vnd.google.fitness.TRACK" />
+ <data android:mimeType="vnd.google.fitness.activity/biking" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
+</pre>
+
+
+
+
+
+<h3 id="TrackRun">Start/Stop a run</h3>
+
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"track my run"</li>
+ <li>"start running"</li>
+ <li>"stop running"</li>
+ </ul>
+</div>
+
+<p>To track a run, use the <code>"vnd.google.fitness.TRACK"</code> action with the
+<code>"vnd.google.fitness.activity/running"</code> MIME type and set the <code>"actionStatus"</code>
+extra to <code>"ActiveActionStatus"</code> when starting and to <code>"CompletedActionStatus"</code>
+when stopping.</p>
+
+<dl>
+ <dt><b>Action</b></dt>
+ <dd><code>"vnd.google.fitness.TRACK"</code><dd>
+
+ <dt><b>Data URI</b></dt>
+ <dd>None</dd>
+
+ <dt><b>MIME Type</b></dt>
+ <dd><code>"vnd.google.fitness.activity/running"</code></dd>
+
+ <dt><b>Extras</b></dt>
+ <dd>
+ <dl>
+ <dt><code>"actionStatus"</code></dt>
+ <dd>A string with the value <code>"ActiveActionStatus"</code> when starting and
+ <code>"CompletedActionStatus"</code> when stopping.</dd>
+ </dl>
+ </dd>
+</dl>
+
+
+<p><b>Example intent:</b></p>
+<pre>
+public void startRun() {
+ Intent intent = new Intent("vnd.google.fitness.TRACK")
+ .setType("vnd.google.fitness.activity/running")
+ .putExtra("actionStatus", "ActiveActionStatus");
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivity(intent);
+ }
+}
+</pre>
+
+
+<p><b>Example intent filter:</b></p>
+<pre>
+<activity ...>
+ <intent-filter>
+ <action android:name="vnd.google.fitness.TRACK" />
+ <data android:mimeType="vnd.google.fitness.activity/running" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
+</pre>
+
+
+
+
+<h3 id="TrackWorkout">Start/Stop a workout</h3>
+
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"start a workout"</li>
+ <li>"track my workout"</li>
+ <li>"stop workout"</li>
+ </ul>
+</div>
+
+<p>To track a workout, use the <code>"vnd.google.fitness.TRACK"</code> action with the
+<code>"vnd.google.fitness.activity/other"</code> MIME type and set the <code>"actionStatus"</code>
+extra to <code>"ActiveActionStatus"</code> when starting and to <code>"CompletedActionStatus"</code>
+when stopping.</p>
+
+<dl>
+ <dt><b>Action</b></dt>
+ <dd><code>"vnd.google.fitness.TRACK"</code><dd>
+
+ <dt><b>Data URI</b></dt>
+ <dd>None</dd>
+
+ <dt><b>MIME Type</b></dt>
+ <dd><code>"vnd.google.fitness.activity/other"</code></dd>
+
+ <dt><b>Extras</b></dt>
+ <dd>
+ <dl>
+ <dt><code>"actionStatus"</code></dt>
+ <dd>A string with the value <code>"ActiveActionStatus"</code> when starting and
+ <code>"CompletedActionStatus"</code> when stopping.</dd>
+ </dl>
+ </dd>
+</dl>
+
+
+<p><b>Example intent:</b></p>
+<pre>
+public void startWorkout() {
+ Intent intent = new Intent("vnd.google.fitness.TRACK")
+ .setType("vnd.google.fitness.activity/other")
+ .putExtra("actionStatus", "ActiveActionStatus");
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivity(intent);
+ }
+}
+</pre>
+
+
+<p><b>Example intent filter:</b></p>
+<pre>
+<activity ...>
+ <intent-filter>
+ <action android:name="vnd.google.fitness.TRACK" />
+ <data android:mimeType="vnd.google.fitness.activity/other" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
+</pre>
+
+
+
+
+<h3 id="ShowHeartRate">Show heart rate</h3>
+
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"what's my heart rate?"</li>
+ <li>"what's my bpm?"</li>
+ </ul>
+</div>
+
+<p>To show the user's heart rate, use the <code>"vnd.google.fitness.VIEW"</code> action with the
+<code>"vnd.google.fitness.data_type<br/>/com.google.heart_rate.bpm"</code> MIME type.</p>
+
+<dl>
+ <dt><b>Action</b></dt>
+ <dd><code>"vnd.google.fitness.VIEW"</code><dd>
+
+ <dt><b>Data URI</b></dt>
+ <dd>None</dd>
+
+ <dt><b>MIME Type</b></dt>
+ <dd><code>"vnd.google.fitness.data_type/com.google.heart_rate.bpm"</code></dd>
+
+ <dt><b>Extras</b></dt>
+ <dd>None</dd>
+</dl>
+
+
+<p><b>Example intent:</b></p>
+<pre>
+public void showHR() {
+ Intent intent = new Intent("vnd.google.fitness.VIEW")
+ .setType("vnd.google.fitness.data_type/com.google.heart_rate.bpm");
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivity(intent);
+ }
+}
+</pre>
+
+
+<p><b>Example intent filter:</b></p>
+<pre>
+<activity ...>
+ <intent-filter>
+ <action android:name="vnd.google.fitness.VIEW" />
+ <data android:mimeType="vnd.google.fitness.data_type/com.google.heart_rate.bpm" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
+</pre>
+
+
+
+
+
+<h3 id="ShowStepCount">Show step count</h3>
+
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"how many steps have I taken?"</li>
+ <li>"what's my step count?"</li>
+ </ul>
+</div>
+
+<p>To show the user's step count, use the <code>"vnd.google.fitness.VIEW"</code> action with the
+<code>"vnd.google.fitness.data_type<br/>/com.google.step_count.cumulative"</code> MIME type.</p>
+
+<dl>
+ <dt><b>Action</b></dt>
+ <dd><code>"vnd.google.fitness.VIEW"</code><dd>
+
+ <dt><b>Data URI</b></dt>
+ <dd>None</dd>
+
+ <dt><b>MIME Type</b></dt>
+ <dd><code>"vnd.google.fitness.data_type/com.google.step_count.cumulative"</code></dd>
+
+ <dt><b>Extras</b></dt>
+ <dd>None</dd>
+</dl>
+
+
+<p><b>Example intent:</b></p>
+<pre>
+public void showStepCount() {
+ Intent intent = new Intent("vnd.google.fitness.VIEW")
+ .setType("vnd.google.fitness.data_type/com.google.step_count.cumulative");
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivity(intent);
+ }
+}
+</pre>
+
+
+<p><b>Example intent filter:</b></p>
+<pre>
+<activity ...>
+ <intent-filter>
+ <action android:name="vnd.google.fitness.VIEW" />
+ <data android:mimeType="vnd.google.fitness.data_type/com.google.step_count.cumulative" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
+</pre>
+
+
+
+
+
+
+
+
+<h2 id="Local">Local Actions</h2>
+
+<h3 id="CallCar">Call a car</h3>
+
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"get me a taxi"</li>
+ <li>"call me a car"</li>
+ </ul>
+ <p style="font-size:13px;margin-bottom:0px;margin-top:10px">(Android Wear only)</p>
+</div>
+
+<p>To call a taxi, use the
+<a href="{@docRoot}com/google/android/gms/actions/ReserveIntents.html#ACTION_RESERVE_TAXI_RESERVATION"><code>ACTION_RESERVE_TAXI_RESERVATION</code></a>
+action.</p>
+
+<p class="note"><strong>Note:</strong> Apps must ask for confirmation from the user
+before completing the action.</p>
+
+<dl>
+ <dt><b>Action</b></dt>
+ <dd><a href="{@docRoot}com/google/android/gms/actions/ReserveIntents.html#ACTION_RESERVE_TAXI_RESERVATION"><code>ACTION_RESERVE_TAXI_RESERVATION</code></a></dd>
+
+ <dt><b>Data URI</b></dt>
+ <dd>None</dd>
+
+ <dt><b>MIME Type</b></dt>
+ <dd>None</dd>
+
+ <dt><b>Extras</b></dt>
+ <dd>None</dd>
+</dl>
+
+
+<p><b>Example intent:</b></p>
+<pre>
+public void callCar() {
+ Intent intent = new Intent(ReserveIntents.ACTION_RESERVE_TAXI_RESERVATION);
+ if (intent.resolveActivity(getPackageManager()) != null) {
+ startActivity(intent);
+ }
+}
+</pre>
+
+
+<p><b>Example intent filter:</b></p>
+<pre>
+<activity ...>
+ <intent-filter>
+ <action android:name="com.google.android.gms.actions.RESERVE_TAXI_RESERVATION" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+</activity>
+</pre>
+
+
+
+
+
@@ -1290,6 +1884,19 @@
<h3 id="PlaySearch">Play music based on a search query</h3>
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"play michael jackson billie jean"</li>
+ </ul>
+</div>
+
<p>To play music based on a search query, use the
{@link android.provider.MediaStore#INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH} intent. An app may fire
this intent in response to the user's voice command to play music. The receiving app for this
@@ -1523,13 +2130,49 @@
the URI scheme defined below. When the phone app opens, it displays the phone number
but the user must press the <em>Call</em> button to begin the phone call.</p>
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"call 555-5555"</li>
+ <li>"call bob"</li>
+ <li>"call voicemail"</li>
+ </ul>
+</div>
+
+<p>To place a phone call directly, use the {@link android.content.Intent#ACTION_CALL} action
+and specify a phone number using the URI scheme defined below. When the phone app opens, it
+begins the phone call; the user does not need to press the <em>Call</em> button.</p>
+
+<p>The {@link android.content.Intent#ACTION_CALL} action requires that you add the
+<code>CALL_PHONE</code> permission to your manifest file:</p>
+
+<pre style="margin-top:45px">
+<uses-permission android:name="android.permission.CALL_PHONE" />
+</pre>
<dl>
<dt><b>Action</b></dt>
-<dd>{@link android.content.Intent#ACTION_DIAL}</dd>
+<dd>
+<ul>
+ <li>{@link android.content.Intent#ACTION_DIAL} - Opens the dialer or phone app.</li>
+ <li>{@link android.content.Intent#ACTION_CALL} - Places a phone call (requires the
+ <code>CALL_PHONE</code> permission)</li>
+</ul>
+</dd>
<dt><b>Data URI Scheme</b></dt>
-<dd>{@code tel:<phone-number>}</dd>
+<dd>
+<ul>
+ <li>{@code tel:<phone-number>}</li>
+ <li>{@code voicemail:<phone-number>}</li>
+</ul>
+</dd>
<dt><b>MIME Type</b></dt>
<dd>None</dd>
@@ -1569,9 +2212,6 @@
-
-
-
<h2 id="Settings">Settings</h2>
<h3 id="OpenSettings">Open a specific section of Settings</h3>
@@ -1735,6 +2375,19 @@
<h3 id="ViewUrl">Load a web URL</h3>
+<!-- Google Now box -->
+<div class="now-box">
+ <div class="now-img-cont">
+ <a href="#Now">
+ <img src="{@docRoot}guide/components/images/voice-icon.png" class="now-img" width="30" height="30" alt=""/>
+ </a>
+ </div>
+ <p class="now-title">Google Now</p>
+ <ul>
+ <li>"open example.com"</li>
+ </ul>
+</div>
+
<p>To open a web page, use the {@link android.content.Intent#ACTION_VIEW} action
and specify the web URL in the intent data.</p>
@@ -1833,3 +2486,200 @@
+
+
+
+
+<h2 id="AdbIntents">Verify Intents with the Android Debug Bridge</h2>
+
+<p>To verify that your app responds to the intents that you want to support, you can use the
+<a href="{@docRoot}tools/help/adb.html"><code>adb</code></a> tool to fire specific intents:</p>
+
+<ol>
+<li>Set up an Android device for <a href="{@docRoot}tools/device.html#setting-up">development</a>,
+or use a <a href="{@docRoot}tools/devices/emulator.html#avds">virtual device</a>.</li>
+<li>Install a version of your app that handles the intents you want to support.</li>
+<li>Fire an intent using <code>adb</code>:
+<pre class="no-pretty-print">
+adb shell am start -a <ACTION> -t <MIME_TYPE> -d <DATA> \
+ -e <EXTRA_NAME> <EXTRA_VALUE> -n <ACTIVITY>
+</pre>
+<p>For example:</p>
+<pre class="no-pretty-print">
+adb shell am start -a android.intent.action.DIAL \
+ -d tel:555-5555 -n org.example.MyApp/.MyActivity
+</pre>
+<li>If you defined the required intent filters, your app should handle the intent.</li>
+</ol>
+
+
+<p>For more information, see
+<a href="{@docRoot}tools/help/adb.html#am">Using activity manager (am)</a>.</p>
+
+
+
+
+
+
+<h2 id="Now">Intents Fired by Google Now</h2>
+
+<p><a href="http://www.google.com/landing/now/">Google Now</a> recognizes many voice commands
+and fires intents for them. As such, users may launch your app with a Google Now voice command
+if your app declares the corresponding intent filter. For example, if your app can
+<a href="#CreateAlarm">set an alarm</a> and you add the corresponding intent filter to your
+manifest file, Google Now lets users choose your app when they request to set an alarm, as
+shown in figure 1.</p>
+
+<img src="{@docRoot}guide/components/images/google-action.png"
+ srcset="{@docRoot}guide/components/images/google-action_2x.png 2x"
+ width="700" height="241" alt=""/>
+<p class="img-caption"><strong>Figure 1.</strong> Google Now lets users choose from installed
+apps that support a given action.</p>
+
+<p>Google Now recognizes voice commands for the actions listed in table 1. For more information
+about declaring each intent filter, click on the action description.</p>
+
+<p class="table-caption"><strong>Table 1.</strong> Voice commands recognized by Google Now
+(Google Search app v3.6).</p>
+<table>
+<tr>
+ <th>Category</th>
+ <th>Details and Examples</th>
+ <th>Action Name</th>
+</tr>
+<tr>
+ <td rowspan="2" style="vertical-align:middle">Alarm</td>
+ <td>
+ <p><a href="#CreateAlarm">Set alarm</a></p>
+ <ul class="now-list">
+ <li>"set an alarm for 7 am"</li>
+ </ul>
+ </td>
+ <td>{@link android.provider.AlarmClock#ACTION_SET_ALARM AlarmClock.ACTION_SET_ALARM}</td>
+</tr>
+<tr>
+ <td>
+ <p><a href="#CreateTimer">Set timer</a></p>
+ <ul class="now-list">
+ <li>"set a timer for 5 minutes"</li>
+ </ul>
+ </td>
+ <td>{@link android.provider.AlarmClock#ACTION_SET_TIMER AlarmClock.ACTION_SET_TIMER}</td>
+</tr>
+<tr>
+ <td style="vertical-align:middle">Communication</td>
+ <td>
+ <p><a href="#DialPhone">Call a number</a></p>
+ <ul class="now-list">
+ <li>"call 555-5555"</li>
+ <li>"call bob"</li>
+ <li>"call voicemail"</li>
+ </ul>
+ </td>
+ <td>{@link android.content.Intent#ACTION_CALL Intent.ACTION_CALL}</td>
+</tr>
+<tr>
+ <td rowspan="5" style="vertical-align:middle">Fitness</td>
+ <td>
+ <p><a href="#TrackRide">Start/stop a bike ride</a></p>
+ <ul class="now-list">
+ <li>"start cycling"</li>
+ <li>"start my bike ride"</li>
+ <li>"stop cycling"</li>
+ </ul>
+ </td>
+ <td><code>"vnd.google.fitness.TRACK"</code></td>
+</tr>
+<tr>
+ <td>
+ <p><a href="#TrackRun">Start/stop a run</a></p>
+ <ul class="now-list">
+ <li>"track my run"</li>
+ <li>"start running"</li>
+ <li>"stop running"</li>
+ </ul>
+ </td>
+ <td><code>"vnd.google.fitness.TRACK"</code></td>
+</tr>
+<tr>
+ <td>
+ <p><a href="#TrackWorkout">Start/stop a workout</a></p>
+ <ul class="now-list">
+ <li>"start a workout"</li>
+ <li>"track my workout"</li>
+ <li>"stop workout"</li>
+ </ul>
+ </td>
+ <td><code>"vnd.google.fitness.TRACK"</code></td>
+</tr>
+<tr>
+ <td>
+ <p><a href="#ShowHeartRate">Show heart rate</a></p>
+ <ul class="now-list">
+ <li>"what's my heart rate"</li>
+ <li>"what's my bpm"</li>
+ </ul>
+ </td>
+ <td><code>"vnd.google.fitness.VIEW"</code></td>
+</tr>
+<tr>
+ <td>
+ <p><a href="#ShowStepCount">Show step count</a></p>
+ <ul class="now-list">
+ <li>"how many steps have I taken"</li>
+ <li>"what's my step count"</li>
+ </ul>
+ </td>
+ <td><code>"vnd.google.fitness.VIEW"</code></td>
+</tr>
+<tr>
+ <td style="vertical-align:middle">Local</td>
+ <td>
+ <p><a href="#CallCar">Book a car</a></p>
+ <ul class="now-list">
+ <li>"call me a car"</li>
+ <li>"book me a taxi"</li>
+ </ul>
+ </td>
+ <td><a href="{@docRoot}reference/com/google/android/gms/actions/ReserveIntents.html#ACTION_RESERVE_TAXI_RESERVATION">
+ <code>ReserveIntents<br/>.ACTION_RESERVE_TAXI_RESERVATION</code></a></td>
+</tr>
+<tr>
+ <td rowspan="3" style="vertical-align:middle">Media</td>
+ <td>
+ <p><a href="#PlaySearch">Play music from search</a></p>
+ <ul class="now-list">
+ <li>"play michael jackson billie jean"</li>
+ </ul>
+ </td>
+ <td>{@link android.provider.MediaStore#INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH MediaStore<br/>.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH}</td>
+</tr>
+<tr>
+ <td>
+ <p><a href="#CameraStill">Take a picture</a></p>
+ <ul class="now-list">
+ <li>"take a picture"</li>
+ </ul>
+ </td>
+ <td>{@link android.provider.MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA MediaStore<br/>.INTENT_ACTION_STILL_IMAGE_CAMERA}</td>
+</tr>
+<tr>
+ <td>
+ <p><a href="#CameraVideo">Record a video</a></p>
+ <ul class="now-list">
+ <li>"record a video"</li>
+ </ul>
+ </td>
+ <td>{@link android.provider.MediaStore#INTENT_ACTION_VIDEO_CAMERA MediaStore<br/>.INTENT_ACTION_VIDEO_CAMERA}</td>
+</tr>
+<tr>
+ <td style="vertical-align:middle">Web browser</td>
+ <td>
+ <p><a href="#ViewUrl">Open URL</a></p>
+ <ul class="now-list">
+ <li>"open example.com"</li>
+ </ul>
+ </td>
+ <td>{@link android.content.Intent#ACTION_VIEW Intent.ACTION_VIEW}</td>
+</tr>
+</table>
diff --git a/docs/html/images/gp-build-buzz-uplift-1.png b/docs/html/images/gp-build-buzz-uplift-1.png
new file mode 100644
index 0000000..4319b5b
--- /dev/null
+++ b/docs/html/images/gp-build-buzz-uplift-1.png
Binary files differ
diff --git a/docs/html/images/gp-build-buzz-uplift-2.png b/docs/html/images/gp-build-buzz-uplift-2.png
new file mode 100644
index 0000000..fd6d1f5
--- /dev/null
+++ b/docs/html/images/gp-build-buzz-uplift-2.png
Binary files differ
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index 852db1f..15564e0 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -743,4 +743,19 @@
"https://support.google.com/googleplay/answer/2651410"
]
},
+ "distribute/stories/games": {
+ "title": "",
+ "resources": [
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/Glu_Deerhunter2014_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/ConcreteSoftware_PBABowling_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/Dragonplay_DragonplaySlots_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/Gameloft_Asphalt8_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/Glu_EternityWarriors3_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/HotheadGames_RivalsatWar_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/TMSOFT_Compulsive_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/Noodlecake_SuperStickmanGolf2_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/TinyRebel_DoctorWhoLegacy_gpgs.pdf",
+ "http://storage.googleapis.com/androiddevelopers/shareables/stories/Senri_LeosFortune_gpgs.pdf"
+ ]
+ }
}
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index 62d18d6..89d9761 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -1264,5 +1264,135 @@
"keywords": [],
"type": "",
"titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Glu_Deerhunter2014_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Glu_Deerhunter2014_gpgs.png",
+ "title": "Deer Hunter 2014 by Glu — Sign-in",
+ "summary": "Glu finds that Google Play Game Services helps improve the user experience which leads to increased player happiness. They also find that Play Games Services signed in users tend to play longer and have a higher lifetime value.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/ConcreteSoftware_PBABowling_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/ConcreteSoftware_PBABowling_gpgs.png",
+ "title": "PBA® Bowling Challenge by Concrete Software — Quests",
+ "summary": "Concrete Software finds that Google Play Game Services' quests are a great way to create new content for users that leads to higher engagement.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Dragonplay_DragonplaySlots_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Dragonplay_DragonplaySlots_gpgs.png",
+ "title": "Dragonplay Slots by Dragonplay — Sign-in",
+ "summary": "Dragonplay finds that players who sign in with Google Play Games services tend to be high quality users who were highly engaged. They also tend to be easier to convert to paying users.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Gameloft_Asphalt8_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Gameloft_Asphalt8_gpgs.png",
+ "title": "Asphalt 8 by Gameloft — Friends invitations",
+ "summary": "Gameloft finds that Google Play Game Services users are more engaged than the average Android user and more likely to convert to paying players.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Glu_EternityWarriors3_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Glu_EternityWarriors3_gpgs.png",
+ "title": "Eternity Warriors 3 by Glu — Gifting",
+ "summary": "Glu finds that Google Play Game Services gifting outperforms other implementations (including those with incentives) because of its seamless flow and consistent performance.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/HotheadGames_RivalsatWar_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/HotheadGames_RivalsatWar_gpgs.jpg",
+ "title": "Rivals at War: Firefight by Hothead Games — Leaderboards",
+ "summary": "Hothead Games is planning to include Google Play Game Services features in all their games going forwards after seeing that players that signed in with Play Games Services tend to show higher retention and a higher average revenue.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/TMSOFT_Compulsive_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/TMSOFT_Compulsive_gpgs.png",
+ "title": "Compulsive by TMSOFT — Cross-platform",
+ "summary": "TMSOFT finds that users who authenticate with Play Games Services on Android and iOS play Compulsive twice as much and purchase in-app products over four times as much.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Noodlecake_SuperStickmanGolf2_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Noodlecake_SuperStickmanGolf2_gpgs.png",
+ "title": "Super Stickman Golf 2 by Noodlecake Studios — Multiplayer",
+ "summary": "Noodlecake Studios finds that Google Play Game Services’ multiplayer feature helps reduce attrition.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/TinyRebel_DoctorWhoLegacy_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/TinyRebelGames_DrWhoLegacy_pgps.png",
+ "title": "Dr. Doctor Who: Legacy by Tiny Rebel Games — Achievements",
+ "summary": "After integrating achievements and cloud services from Google Play Game Services, Tiny Rebel Games saw a dramatic increase in daily revenues as a result of an increase in daily installs and an increase in the average revenue per install.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Senri_LeosFortune_gpgs.pdf",
+ "timestamp": null,
+ "image": "http://storage.googleapis.com/androiddevelopers/shareables/stories/Senri_LeosFortune_gpgs.png",
+ "title": "Leo’s Fortune by 1337 & Senri — Saved games",
+ "summary": "1337 + Senri finds that Google Play Game Services is easy to integrate and provides essential game functions like cloud saved games, achievements and leaderboards which have a very large adoption rate amongst players.",
+ "keywords": ["stories"],
+ "type": "Case Study Deck",
+ "titleFriendly": ""
}
]);
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
index beea0ca..87185b1 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/preview/api-overview.jd
@@ -408,7 +408,7 @@
<p>The Java interface for OpenGL ES 3.1 on Android is provided with {@code GLES31}. When
using OpenGL ES 3.1, be sure that you declare it in your manifest file with the
<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
-tag and the {@code android:glEsVversion} attribute. For example:</p>
+tag and the {@code android:glEsVersion} attribute. For example:</p>
<pre>
<manifest>
diff --git a/docs/html/preview/tv/ui/recommendations.jd b/docs/html/preview/tv/ui/recommendations.jd
index 2c78064..a2ff55c 100644
--- a/docs/html/preview/tv/ui/recommendations.jd
+++ b/docs/html/preview/tv/ui/recommendations.jd
@@ -9,7 +9,6 @@
<li><a href="#service">Create a Recommendations Service</a></li>
<li><a href="#build">Build Recommendations</a></li>
<li><a href="#run-service">Run Recommendations Service</a></li>
- <li><a href="#DesignLandscapeLayouts">Design Landscape Layouts</a></li>
</ol>
</div>
diff --git a/docs/html/sdk/download.jd b/docs/html/sdk/download.jd
index 4329102..52432cf 100644
--- a/docs/html/sdk/download.jd
+++ b/docs/html/sdk/download.jd
@@ -14,9 +14,9 @@
if (location.indexOf('?v=') != -1) {
var filename = location.substring(location.indexOf('=')+1,location.length);
if (document.getElementById('checkbox').checked) {
- document.location = "http://dl.google.com/android/" + filename;
+ document.location = "https://dl.google.com/android/" + filename;
}
- document.getElementById('click-download').setAttribute("href", "http://dl.google.com/android/"
+ document.getElementById('click-download').setAttribute("href", "https://dl.google.com/android/"
+ filename);
$("#terms-form").hide(500);
$("#next-steps").show(500);
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index edee360..70410c1 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -246,11 +246,9 @@
<p>The Android SDK provides you the API libraries and developer tools necessary to build, test,
and debug apps for Android.</p>
-<p>If you're a new Android developer, we recommend you download the ADT Bundle
-to quickly start developing apps. It includes the essential
-Android SDK components and a version of the Eclipse IDE with built-in
-<b>ADT (Android Developer Tools)</b> to
-streamline your Android app development.</p>
+<p>Download the ADT Bundle to quickly start developing apps. It includes the essential Android
+SDK components and a version of the Eclipse IDE with built-in <b>ADT (Android Developer Tools)</b>
+to streamline your Android app development.</p>
<!-- this appears when viewing the online docs -->
diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd
index 304b53d..ec0e2f8 100644
--- a/docs/html/sdk/installing/index.jd
+++ b/docs/html/sdk/installing/index.jd
@@ -112,7 +112,7 @@
your JDK folder, for example <code>C:\Program Files\Java\jdk1.7.0_21</code>.</p>
</p>
</li>
-
+
</ol>
@@ -260,10 +260,10 @@
<h5 id="Troubleshooting" style="margin-bottom:15px"><a href='' class="expandable"
- onclick="toggleExpandable(this,'#ubuntu-trouble');return false;"
+ onclick="toggleExpandable(this,'#UbuntuTrouble');return false;"
>Troubleshooting Ubuntu</a></h5>
-<div id="ubuntu-trouble" style="display:none">
+<div id="UbuntuTrouble" style="display:none">
<ul>
<li>If you need help installing and configuring Java on your
development machine, you might find these resources helpful:
@@ -416,6 +416,9 @@
}
}
-
-
+/* direct link to ubuntu troubleshooting */
+if ( document.location.href.indexOf('#UbuntuTrouble') > -1 ) {
+ $(".linux.docs").show();
+ toggleExpandable(this,'#UbuntuTrouble');
+}
</script>
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
index 5a433d4..c8200aa 100644
--- a/docs/html/sdk/installing/installing-adt.jd
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -1,8 +1,8 @@
page.title=Installing the Eclipse Plugin
-adt.zip.version=23.0.3
-adt.zip.download=ADT-23.0.3.zip
-adt.zip.bytes=103321934
-adt.zip.checksum=ab2f5e2fbbdddeeb7dfd02cd4046538a
+adt.zip.version=23.0.4
+adt.zip.download=ADT-23.0.4.zip
+adt.zip.bytes=103336810
+adt.zip.checksum=91a43dcf686ab73dec2c08b77243492b
@jd:body
diff --git a/docs/html/sdk/installing/studio-build.jd b/docs/html/sdk/installing/studio-build.jd
index 29ba12d..bff3bc0 100644
--- a/docs/html/sdk/installing/studio-build.jd
+++ b/docs/html/sdk/installing/studio-build.jd
@@ -454,8 +454,8 @@
for debugging purposes.</p>
<p>After you build the project, the output APK for the app module is located in
-<code>app/build/apk/</code>, and the output AAR for the lib module is located in
-<code>lib/build/libs/</code>.</p>
+<code>app/build/outputs/apk/</code>, and the output AAR for the lib module is located in
+<code>lib/build/outputs/libs/</code>.</p>
<p>To see a list of all available build tasks for your project, type this command:</p>
diff --git a/docs/html/sdk/installing/studio.jd b/docs/html/sdk/installing/studio.jd
index ee14b19..776e312 100644
--- a/docs/html/sdk/installing/studio.jd
+++ b/docs/html/sdk/installing/studio.jd
@@ -220,7 +220,7 @@
<li>Lint tools to catch performance, usability, version compatibility, and other problems.</li>
<li>ProGuard and app-signing capabilities.</li>
<li>Built-in support for <a
- href="https://developers.google.com/cloud/devtools/android_studio_templates/"
+ href="https://developers.google.com/cloud/mobile"
class="external-link">Google Cloud Platform</a>, making it easy to integrate Google Cloud
Messaging and App Engine.
</ul>
diff --git a/docs/html/tools/index.jd b/docs/html/tools/index.jd
index f9d452c..73f8969 100644
--- a/docs/html/tools/index.jd
+++ b/docs/html/tools/index.jd
@@ -1,16 +1,16 @@
page.title=Developer Tools
@jd:body
-
-<img src="{@docRoot}images/tools-home.png" style="float:right;" height="415" width="763" />
+
+<img src="{@docRoot}images/tools-home.png" style="float:right;" height="347" width="400" />
<div style="position:relative;height:0">
-<div style="position:absolute;width:420px">
+<div style="position:absolute;width:420px">
<p>The Android Developer Tools (ADT) plugin for Eclipse provides
a professional-grade development environment for building
Android apps. It's a full Java IDE with advanced features to help you build, test, debug,
and package your Android apps. </p>
- <p>Free, open-source, and runs on most major OS platforms.<br>To get started,
+ <p>Free, open-source, and runs on most major OS platforms.<br>To get started,
<a href="{@docRoot}sdk/index.html">download the Android SDK.</a></p>
</div>
</div>
@@ -21,11 +21,11 @@
<h3>Full Java IDE</h3>
<ul>
- <li>Android-specific refactoring, quick fixes, integrated navigation between Java and XML resources.</li>
- <li>Enhanced XML editors for Android XML resources.</li>
- <li>Static analysis tools to catch performance, usability, and correctness problems.</li>
- <li>Build support for complex projects, command-line support for CI through Ant. Includes ProGuard and app-signing. </li>
- <li>Template-based wizard to create standard Android projects and components.</li>
+ <li>Android-specific refactoring, quick fixes, integrated navigation between Java and XML resources.</li>
+ <li>Enhanced XML editors for Android XML resources.</li>
+ <li>Static analysis tools to catch performance, usability, and correctness problems.</li>
+ <li>Build support for complex projects, command-line support for CI through Ant. Includes ProGuard and app-signing. </li>
+ <li>Template-based wizard to create standard Android projects and components.</li>
</ul>
</div>
@@ -34,7 +34,7 @@
<h3>Graphical UI Builders</h3>
<ul>
- <li>Build rich Android UI with drag and drop.
+ <li>Build rich Android UI with drag and drop.
<li>Visualize your UI on tablets, phones, and other devices. Switch themes, locales, even platform versions instantly, without building.</li>
<li>Visual refactoring lets you extracts layout for inclusion, convert layouts, extract styles.</li>
<li>Editor support for working with custom UI components.</li>
@@ -71,9 +71,9 @@
<h3>Develop on Hardware Devices</h3>
<ul>
- <li>Use any commercial Android hardware device or multiple devices.</li>
- <li>Deploy your app to connected devices directy from the IDE.</li>
- <li>Live, on-device debugging, testing, and profiling.</li>
+ <li>Use any commercial Android hardware device or multiple devices.</li>
+ <li>Deploy your app to connected devices directy from the IDE.</li>
+ <li>Live, on-device debugging, testing, and profiling.</li>
</ul>
</div>
@@ -100,7 +100,7 @@
</ul>
<h3>Testing</h3>
-
+
<ul>
<li>Fully instrumentated, scriptable test environment.</li>
<li>Integrated reports using standard test UI.</li>
@@ -108,7 +108,7 @@
</ul>
<h3>Native Development</h3>
-
+
<ul>
<li>Support for compiling and packaging existing code written in C or C++.</li>
<li>Support for packaging multiple architectures in a single binary, for broad compatibility.</li>
diff --git a/docs/html/tools/sdk/eclipse-adt.jd b/docs/html/tools/sdk/eclipse-adt.jd
index cf33200..deafed5 100644
--- a/docs/html/tools/sdk/eclipse-adt.jd
+++ b/docs/html/tools/sdk/eclipse-adt.jd
@@ -53,9 +53,44 @@
<p>For a summary of all known issues in ADT, see <a
href="http://tools.android.com/knownissues">http://tools.android.com/knownissues</a>.</p>
+
<div class="toggle-content opened">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+ alt=""/>ADT 23.0.4</a> <em>(October 2014)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+<dl>
+ <dt>Dependencies:</dt>
+
+ <dd>
+ <ul>
+ <li>Java 7 or higher is required if you are targeting the L Developer Preview.</li>
+ <li>Java 1.6 or higher is required if you are targeting other releases.</li>
+ <li>Eclipse Indigo (Version 3.7.2) or higher is required.</li>
+ <li>This version of ADT is designed for use with
+ <a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools r23.0.2</a>.
+ If you haven't already installed SDK Tools r23.0.2 into your SDK, use the
+ Android SDK Manager to do so.</li>
+ </ul>
+ </dd>
+
+ <dt>General Notes:</dt>
+ <dd>
+ <ul>
+ <li>Fixed duplicate devices in AVD for Wear and TV.</li>
+ </ul>
+ </dd>
+</dl>
+</div>
+</div>
+
+
+
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
alt=""/>ADT 23.0.3</a> <em>(August 2014)</em>
</p>
diff --git a/docs/html/training/graphics/opengl/environment.jd b/docs/html/training/graphics/opengl/environment.jd
index 77faabf..6b00c76 100644
--- a/docs/html/training/graphics/opengl/environment.jd
+++ b/docs/html/training/graphics/opengl/environment.jd
@@ -68,8 +68,7 @@
</pre>
<p>If your application uses texture compression, you must also declare which compression formats
-you support so that devices that do not support theses formats do not try to run your
-application:</p>
+your app supports, so that it is only installed on compatible devices.</p>
<pre>
<supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" />
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 4dd57ab..5443c56 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -784,6 +784,34 @@
<li class="nav-section">
<div class="nav-section-header">
+ <a href="<?cs var:toroot ?>training/wearables/ui/index.html"
+ description="How to create custom user interfaces for wearable apps."
+ >Creating Custom UIs</a>
+ </div>
+ <ul>
+ <li>
+ <a href="<?cs var:toroot ?>training/wearables/ui/layouts.html">Defining Layouts</a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/wearables/ui/cards.html">Creating Cards</a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/wearables/ui/lists.html">Creating Lists</a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/wearables/ui/2d-picker.html">Creating a 2D Picker</a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/wearables/ui/confirm.html">Showing Confirmations</a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/wearables/ui/exit.html">Exiting Full-Screen Activities</a>
+ </li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header">
<a href="<?cs var:toroot ?>training/wearables/data-layer/index.html"
description="How to sync data between handhelds and wearables."
>Sending and Syncing Data</a>
diff --git a/docs/html/training/wearables/data-layer/index.jd b/docs/html/training/wearables/data-layer/index.jd
index bac7d3e..39d6561 100644
--- a/docs/html/training/wearables/data-layer/index.jd
+++ b/docs/html/training/wearables/data-layer/index.jd
@@ -28,7 +28,7 @@
<dt><b>Messages</b></dt>
<dd>The <a href="{@docRoot}reference/com/google/android/gms/wearable/MessageApi.html"><code>MessageApi</code></a> class
- can send messages designed for "fire-and-forget" commands, such as controlling a handheld's
+ can send messages and is good for remote procedure calls (RPC), such as controlling a handheld's
media player from the wearable or starting an intent on the wearable from the handheld.
The system always delivers the message when the handheld and wearable are connected and delivers
an error when the devices are disconnected. Messages are great for one-way requests or for a
diff --git a/docs/html/training/wearables/data-layer/messages.jd b/docs/html/training/wearables/data-layer/messages.jd
index 15e552d..71f1bb1 100644
--- a/docs/html/training/wearables/data-layer/messages.jd
+++ b/docs/html/training/wearables/data-layer/messages.jd
@@ -23,8 +23,8 @@
</ul>
<p>
Unlike data items, there is no syncing between the handheld and wearable apps.
-Messages are a one-way communication mechanism that's meant for
-"fire-and-forget" tasks, such as sending a message to the wearable
+Messages are a one-way communication mechanism that's good for remote procedure calls (RPC),
+such as sending a message to the wearable
to start an activity. You can also use messages in request/response model
where one side of the connection sends a message, does some work,
sends back a response message.</p>
diff --git a/docs/html/training/wearables/ui/2d-picker.jd b/docs/html/training/wearables/ui/2d-picker.jd
new file mode 100644
index 0000000..8f4d8af
--- /dev/null
+++ b/docs/html/training/wearables/ui/2d-picker.jd
@@ -0,0 +1,181 @@
+page.title=Creating a 2D Picker
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#add-page-grid">Add a Page Grid</a></li>
+ <li><a href="#implement-adapter">Implement a Page Adapter</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}design/wear/index.html">Android Wear Design Principles</a></li>
+</ul>
+</div>
+</div>
+
+<p>The <a href="{@docRoot}design/wear/structure.html#2DPicker">2D Picker</a> pattern in Android
+Wear allows users to navigate and choose from a set of items shown as pages. The Wearable UI
+Library lets you easily implement this pattern using a page grid, which is a layout manager
+that allows users to scroll vertically and horizontally through pages of data.</p>
+
+<p>To implement this pattern, you add a <code>GridViewPager</code> element to the layout
+of your activity and implement an adapter that provides a set of pages by extending
+the <code>FragmentGridPagerAdapter</code> class.</p>
+
+<p class="note"><strong>Note:</strong> The <em>GridViewPager</em> sample in the Android SDK
+demonstrates how to use the <code>GridViewPager</code> layout in your apps. This sample is
+located in the <code>android-sdk/samples/android-20/wearable/GridViewPager</code> directory.</p>
+
+
+<h2 id="add-page-grid">Add a Page Grid</h2>
+
+<p>Add a <code>GridViewPager</code> element to your layout definition as follows:</p>
+
+<pre>
+<android.support.wearable.view.GridViewPager
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/pager"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+</pre>
+
+<p>You can use any of the techniques described in
+<a href="{@docRoot}training/wearables/ui/layouts.html">Defining Layouts</a> to ensure that
+your 2D picker works on both round and square devices.</p>
+
+
+<h2 id="implement-adapter">Implement a Page Adapter</h2>
+
+<p>A page adapter provides a set of pages to populate a <code>GridViewPager</code> component. To
+implement this adapter, you extend the <code>FragmentGridPageAdapter</code> class from the
+Wearable UI Library</p>
+
+<p>For example, the <em>GridViewPager</em> sample in the Android SDK contains
+the following adapter implementation that provides a set of static cards with custom background
+images:</p>
+
+<pre>
+public class SampleGridPagerAdapter extends FragmentGridPagerAdapter {
+
+ private final Context mContext;
+
+ public SampleGridPagerAdapter(Context ctx, FragmentManager fm) {
+ super(fm);
+ mContext = ctx;
+ }
+
+ static final int[] BG_IMAGES = new int[] {
+ R.drawable.debug_background_1, ...
+ R.drawable.debug_background_5
+ };
+
+ // A simple container for static data in each page
+ private static class Page {
+ // static resources
+ int titleRes;
+ int textRes;
+ int iconRes;
+ ...
+ }
+
+ // Create a static set of pages in a 2D array
+ private final Page[][] PAGES = { ... };
+
+ // Override methods in FragmentGridPagerAdapter
+ ...
+}
+</pre>
+
+<p>The picker calls <code>getFragment</code> and <code>getBackground</code> to retrieve the content
+to display at each position of the grid:</p>
+
+<pre>
+// Obtain the UI fragment at the specified position
+@Override
+public Fragment getFragment(int row, int col) {
+ Page page = PAGES[row][col];
+ String title =
+ page.titleRes != 0 ? mContext.getString(page.titleRes) : null;
+ String text =
+ page.textRes != 0 ? mContext.getString(page.textRes) : null;
+ CardFragment fragment = CardFragment.create(title, text, page.iconRes);
+
+ // Advanced settings (card gravity, card expansion/scrolling)
+ fragment.setCardGravity(page.cardGravity);
+ fragment.setExpansionEnabled(page.expansionEnabled);
+ fragment.setExpansionDirection(page.expansionDirection);
+ fragment.setExpansionFactor(page.expansionFactor);
+ return fragment;
+}
+
+// Obtain the background image for the page at the specified position
+@Override
+public ImageReference getBackground(int row, int column) {
+ return ImageReference.forDrawable(BG_IMAGES[row % BG_IMAGES.length]);
+}
+</pre>
+
+<p>The <code>getRowCount</code> method tells the picker how many rows of content are
+available, and the <code>getColumnCount</code> method tells the picker how many columns
+of content are available for each of the rows.</p>
+
+<pre>
+// Obtain the number of pages (vertical)
+@Override
+public int getRowCount() {
+ return PAGES.length;
+}
+
+// Obtain the number of pages (horizontal)
+@Override
+public int getColumnCount(int rowNum) {
+ return PAGES[rowNum].length;
+}
+</pre>
+
+<p>The adapter implementation details depend on your particular set of pages. Each page provided
+by the adapter is of type <code>Fragment</code>. In this example, each page is a
+<code>CardFragment</code> instance that uses one of the default card layouts. However, you can
+combine different types of pages in the same 2D picker, such as cards, action icons, and custom
+layouts depending on your use cases.</p>
+
+<div style="float:right;margin-left:25px;width:250px">
+<img src="{@docRoot}wear/images/07_uilib.png" width="250" height="250" alt=""/>
+<p class="img-caption" style="text-align:center"><strong>Figure 1:</strong>
+The <em>GridViewPager</em> sample.</p>
+</div>
+
+<p>Not all rows need to have the same number of pages. Notice that in this example the number of
+colums is different for each row. You can also use a <code>GridViewPager</code> component to
+implement a 1D picker with only one row or only one column.</p>
+
+<p><code>GridViewPager</code> provides support for scrolling in cards whose content does not fit
+the device screen. This example configures each card to expand as required, so users can scroll
+through the card's content. When users reach the end of a scrollable card, a swipe in the same
+direction shows the next page on the grid, if one is available.</p>
+
+<p>You can specify a custom background for each page with the <code>getBackground()</code> method.
+When users swipe to navigate across pages, <code>GridViewPager</code> applies parallax
+and crossfade effects between different backgrounds automatically.</p>
+
+<h3>Assign an adapter instance to the page grid</h3>
+
+<p>In your activity, assign an instance of your adapter implementation to the
+<code>GridViewPager</code> component:</p>
+
+<pre>
+public class MainActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ ...
+ final GridViewPager pager = (GridViewPager) findViewById(R.id.pager);
+ pager.setAdapter(new SampleGridPagerAdapter(this, getFragmentManager()));
+ }
+}
+</pre>
diff --git a/docs/html/training/wearables/ui/cards.jd b/docs/html/training/wearables/ui/cards.jd
new file mode 100644
index 0000000..0633720
--- /dev/null
+++ b/docs/html/training/wearables/ui/cards.jd
@@ -0,0 +1,169 @@
+page.title=Creating Cards
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#card-fragment">Create a Card Fragment</a></li>
+ <li><a href="#card-layout">Add a Card to Your Layout</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}design/wear/index.html">Android Wear Design Principles</a></li>
+</ul>
+</div>
+</div>
+
+
+<p>Cards present information to users with a consistent look and feel across different apps.
+This lesson shows you how to create cards in your Android Wear apps.</p>
+
+<p>The Wearable UI Library provides implementations of cards specifically designed for wearable
+devices. This library contains the <code>CardFrame</code> class, which wraps views inside
+a card-styled frame with a white background, rounded corners, and a light-drop shadow.
+<code>CardFrame</code> can only contain one direct child, usually a layout manager, to which
+you can add other views to customize the content inside the card.</p>
+
+<p>You can add cards to your app in two ways:</p>
+
+<ul>
+ <li>Use or extend the <code>CardFragment</code> class.</li>
+ <li>Add a card inside a <code>CardScrollView</code> in your layout.</li>
+</ul>
+
+<p class="note"><strong>Note:</strong> This lesson shows you how to add cards to Android Wear
+activities. Android notifications on wearable devices are also displayed as cards. For more
+information, see <a href="{@docRoot}training/wearables/notifications/index.html">Adding Wearable
+Features to Notifications</a>.</p>
+
+
+<h2 id="card-fragment">Create a Card Fragment</h2>
+
+<p>The <code>CardFragment</code> class provides a default card layout with a title, a
+description, and an icon. Use this approach to add cards to your app if the default card layout
+shown in figure 1 meets your needs.</p>
+
+<img src="{@docRoot}wear/images/05_uilib.png" width="500" height="245" alt=""/>
+<p class="img-caption"><strong>Figure 1.</strong> The default <code>CardFragment</code> layout.</p>
+
+<p>To add a <code>CardFragment</code> to your app:</p>
+
+<ol>
+<li>In your layout, assign an ID to the element that contains the card</li>
+<li>Create a <code>CardFragment</code> instance in your activity</li>
+<li>Use the fragment manager to add the <code>CardFragment</code> instance to its container</li>
+</ol>
+
+<p>The following sample code shows the code for the screen display shown in Figure 1:</p>
+
+<pre>
+<android.support.wearable.view.BoxInsetLayout
+xmlns:android="http://schemas.android.com/apk/res/android"
+xmlns:app="http://schemas.android.com/apk/res-auto"
+android:background="@drawable/robot_background"
+android:layout_height="match_parent"
+android:layout_width="match_parent">
+
+ <FrameLayout
+ <strong>android:id="@+id/frame_layout"</strong>
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_box="bottom">
+
+ </FrameLayout>
+</android.support.wearable.view.BoxInsetLayout>
+</pre>
+
+<p>The following code adds the <code>CardFragment</code> instance to the activity in Figure 1:</p>
+
+<pre>
+protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_wear_activity2);
+
+ FragmentManager fragmentManager = getFragmentManager();
+ FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
+ CardFragment cardFragment = CardFragment.create(getString(R.string.cftitle),
+ getString(R.string.cfdesc),
+ R.drawable.p);
+ fragmentTransaction.add(R.id.frame_layout, cardFragment);
+ fragmentTransaction.commit();
+}
+</pre>
+
+<p>To create a card with a custom layout using <code>CardFragment</code>, extend this class
+and override its <code>onCreateContentView</code> method.</p>
+
+
+<h2 id="card-layout">Add a CardFrame to Your Layout</h2>
+
+<p>You can also add a card directly to your layout definition, as shown in figure 2. Use this
+approach when you want to define a custom layout for the card inside a layout definition file.</p>
+
+<img src="{@docRoot}wear/images/04_uilib.png" width="500" height="248" alt=""/>
+<p class="img-caption"><strong>Figure 2.</strong> Adding a <code>CardFrame</code> to your
+layout.</p>
+
+<p>The following layout code sample demonstrates a vertical linear layout with two elements. You
+can create more complex layouts to fit the needs of your app.</p>
+
+<pre>
+<android.support.wearable.view.BoxInsetLayout
+xmlns:android="http://schemas.android.com/apk/res/android"
+xmlns:app="http://schemas.android.com/apk/res-auto"
+android:background="@drawable/robot_background"
+android:layout_height="match_parent"
+android:layout_width="match_parent">
+
+ <<strong>android.support.wearable.view.CardScrollView</strong>
+ android:id="@+id/card_scroll_view"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ app:layout_box="bottom">
+
+ <<strong>android.support.wearable.view.CardFrame</strong>
+ android:layout_height="wrap_content"
+ android:layout_width="fill_parent">
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:orientation="vertical"
+ android:paddingLeft="5dp">
+ <TextView
+ android:fontFamily="sans-serif-light"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/custom_card"
+ android:textColor="@color/black"
+ android:textSize="20sp"/>
+ <TextView
+ android:fontFamily="sans-serif-light"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/description"
+ android:textColor="@color/black"
+ android:textSize="14sp"/>
+ </LinearLayout>
+ </android.support.wearable.view.CardFrame>
+ </android.support.wearable.view.CardScrollView>
+</android.support.wearable.view.BoxInsetLayout>
+</pre>
+
+<p>The <code>CardScrollView</code> element in the example layout above lets you assign gravity to
+the card when its content is smaller than the container. This example aligns the card to the
+bottom of the screen:</p>
+
+<pre>
+@Override
+protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_wear_activity2);
+
+ CardScrollView cardScrollView =
+ (CardScrollView) findViewById(R.id.card_scroll_view);
+ cardScrollView.setCardGravity(Gravity.BOTTOM);
+}
+</pre>
diff --git a/docs/html/training/wearables/ui/confirm.jd b/docs/html/training/wearables/ui/confirm.jd
new file mode 100644
index 0000000..36330a6
--- /dev/null
+++ b/docs/html/training/wearables/ui/confirm.jd
@@ -0,0 +1,166 @@
+page.title=Showing Confirmations
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#confirmation-timers">Use Automatic Confirmation Timers</a></li>
+ <li><a href="#show-confirmation">Show Confirmation Animations</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}design/wear/index.html">Android Wear Design Principles</a></li>
+</ul>
+</div>
+</div>
+
+
+<p><a href="{@docRoot}design/wear/patterns.html#Countdown">Confirmations</a> in Android Wear apps
+use the whole screen or a larger portion of it than those in handheld apps. This ensures that
+users can see these confirmations by just glancing at the screen and that they have large enough
+touch targets to cancel an action.</p>
+
+<p>The Wearable UI Library helps you show confirmation animations and timers in your
+Android Wear apps:</p>
+
+<dl>
+<dt><em>Confirmation timers</em></dt>
+ <dd>Automatic confirmation timers show users an animated timer that lets them cancel an action
+ they just performed.</dd>
+<dt><em>Confirmation animations</em></dt>
+ <dd>Confirmation animations give users visual feedback when they complete an action.</dd>
+</dl>
+
+<p>The following sections show you how to implement these patterns.</p>
+
+
+<h2 id="confirmation-timers">Use Automatic Confirmation Timers</h2>
+
+<div style="float:right;margin-left:25px;width:230px;margin-top:10px">
+<img src="{@docRoot}wear/images/09_uilib.png" width="230" height="230" alt=""/>
+<p class="img-caption" style="text-align:center"><strong>Figure 1:</strong>
+A confirmation timer.</p>
+</div>
+
+<p>Automatic confirmation timers let users cancel an action they just performed. When the user
+performs the action, your app shows a button to cancel the action with a timer animation and
+starts the timer. The user has the option to cancel the action until the timer finishes. Your app
+gets notified if the user cancels the action and when the timer expires.</p>
+
+<p>To show a confirmation timer when users complete an action in your app:</p>
+
+<ol>
+<li>Add a <code>DelayedConfirmationView</code> element to your layout.</li>
+<li>Implement the <code>DelayedConfirmationListener</code> interface in your activity.</li>
+<li>Set the duration of the timer and start it when the user completes an action.</li>
+</ol>
+
+<p>Add the <code>DelayedConfirmationView</code> element to your layout as follows:</p>
+
+<pre>
+<android.support.wearable.view.DelayedConfirmationView
+ android:id="@+id/delayed_confirm"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:src="@drawable/cancel_circle"
+ app:circle_border_color="@color/lightblue"
+ app:circle_border_width="4dp"
+ app:circle_radius="16dp">
+</android.support.wearable.view.DelayedConfirmationView>
+</pre>
+
+<p>You can assign a drawable resource to display inside the circle with the
+<code>android:src</code> attribute and configure the parameters of the circle directly on the
+layout definition.</p>
+
+<p>To be notified when the timer finishes or when users tap on it, implement the corresponding
+listener methods in your activity:</p>
+
+<pre>
+public class WearActivity extends Activity implements
+ DelayedConfirmationView.DelayedConfirmationListener {
+
+ private DelayedConfirmationView mDelayedView;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_wear_activity);
+
+ mDelayedView =
+ (DelayedConfirmationView) findViewById(R.id.delayed_confirm);
+ mDelayedView.setListener(this);
+ }
+
+ @Override
+ public void onTimerFinished(View view) {
+ // User didn't cancel, perform the action
+ }
+
+ @Override
+ public void onTimerSelected(View view) {
+ // User canceled, abort the action
+ }
+}
+</pre>
+
+<p>To start the timer, add the following code to the point in your activity where users select
+an action:</p>
+
+<pre>
+// Two seconds to cancel the action
+mDelayedView.setTotalTimeMs(2000);
+// Start the timer
+mDelayedView.start();
+</pre>
+
+
+<h2 id="show-confirmation">Show Confirmation Animations</h2>
+
+<div style="float:right;margin-left:25px;width:200px">
+<img src="{@docRoot}wear/images/08_uilib.png" width="200" height="200" alt=""/>
+<p class="img-caption" style="text-align:center"><strong>Figure 2:</strong>
+A confirmation animation.</p>
+</div>
+
+<p>To show a confirmation animation when users complete an action in your app, create an intent
+that starts <code>ConfirmationActivity</code> from one of your activities. You can specify
+one of the these animations with the <code>EXTRA_ANIMATION_TYPE</code> intent extra:</p>
+
+<ul>
+<li><code>SUCCESS_ANIMATION</code></li>
+<li><code>FAILURE_ANIMATION</code></li>
+<li><code>OPEN_ON_PHONE_ANIMATION</code></li>
+</ul>
+
+<p>You can also add a message that appears under the confirmation icon.</p>
+
+<p>To use the <code>ConfirmationActivity</code> in your app, first declare this activity in your
+manifest file:</p>
+
+<pre>
+<manifest>
+ <application>
+ ...
+ <activity
+ android:name="android.support.wearable.activity.ConfirmationActivity">
+ </activity>
+ </application>
+</manifest>
+</pre>
+
+<p>Then determine the result of the user action and start the activity with an intent:</p>
+
+<pre>
+Intent intent = new Intent(this, ConfirmationActivity.class);
+intent.putExtra(ConfirmationActivity.EXTRA_ANIMATION_TYPE,
+ ConfirmationActivity.SUCCESS_ANIMATION);
+intent.putExtra(ConfirmationActivity.EXTRA_MESSAGE,
+ getString(R.string.msg_sent));
+startActivity(intent);
+</pre>
+
+<p>After showing the confirmation animation, <code>ConfirmationActivity</code> finishes and your
+activity resumes.</p>
diff --git a/docs/html/training/wearables/ui/exit.jd b/docs/html/training/wearables/ui/exit.jd
new file mode 100644
index 0000000..b89711a
--- /dev/null
+++ b/docs/html/training/wearables/ui/exit.jd
@@ -0,0 +1,110 @@
+page.title=Exiting Full-Screen Activities
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#disable-swipe">Disable the Swipe-To-Dismiss Gesture</a></li>
+ <li><a href="#long-press">Implement the Long Press to Dismiss Pattern</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}design/wear/index.html">Android Wear Design Principles</a></li>
+</ul>
+</div>
+</div>
+
+
+<p>By default, users exit Android Wear activities by swiping from left to right. If the app
+contains horizontally scrollable content, users first have to navigate to the edge of the
+content and then swipe again from left to right to exit the app.</p>
+
+<p>For more immersive experiences, like an app that can scroll a map in any direction, you can
+disable the swipe to exit gesture in your app. However, if you disable it, you must implement
+the long-press-to-dismiss UI pattern to let users exit your app using the
+<code>DismissOverlayView</code> class from the Wearable UI Library.
+You must also inform your users the first time they run your app that they can exit using
+a long press.</p>
+
+<p>For design guidelines on exiting Android Wear activities, see
+<a href="{@docRoot}design/wear/structure.html#Custom">Breaking out of the card</a>.</p>
+
+
+<h2 id="disable-swipe">Disable the Swipe-To-Dismiss Gesture</h2>
+
+<p>If the user interaction model of your app interferes with the swipe-to-dismiss gesture,
+you can disable it for your app. To disable the swipe-to-dismiss gesture in your app, extend
+the default theme and set the <code>android:windowSwipeToDismiss</code> attribute to
+<code>false</code>:</p>
+
+<pre>
+<style name="AppTheme" parent="Theme.DeviceDefault">
+ <item name="android:windowSwipeToDismiss">false</item>
+</style>
+</pre>
+
+<p>If you disable this gesture, you must implement the long-press-to-dismiss UI pattern to let users
+exit your app, as described in the next section.</p>
+
+
+<h2 id="long-press">Implement the Long Press to Dismiss Pattern</h2>
+
+<p>To use the <code>DissmissOverlayView</code> class in your activity, add this element to
+your layout definition such that it covers the whole screen and is placed above all other views.
+For example:</p>
+
+<pre>
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+
+ <!-- other views go here -->
+
+ <android.support.wearable.view.DismissOverlayView
+ android:id="@+id/dismiss_overlay"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"/>
+<FrameLayout>
+</pre>
+
+<p>In your activity, obtain the <code>DismissOverlayView</code> element and set some introductory
+text. This text is shown to users the first time they run your app to inform them that they
+can exit the app using a long press gesture. Then use a <code>GestureDetector</code> to detect
+a long press:</p>
+
+<pre>
+public class WearActivity extends Activity {
+
+ private DismissOverlayView mDismissOverlay;
+ private GestureDetector mDetector;
+
+ public void onCreate(Bundle savedState) {
+ super.onCreate(savedState);
+ setContentView(R.layout.wear_activity);
+
+ // Obtain the DismissOverlayView element
+ mDismissOverlay = (DismissOverlayView) findViewById(R.id.dismiss_overlay);
+ mDismissOverlay.setIntroText(R.string.long_press_intro);
+ mDismissOverlay.showIntroIfNecessary();
+
+ // Configure a gesture detector
+ mDetector = new GestureDetector(this, new SimpleOnGestureListener() {
+ public void onLongPress(MotionEvent ev) {
+ mDismissOverlay.show();
+ }
+ });
+ }
+
+ // Capture long presses
+ @Override
+ public boolean onTouchEvent(MotionEvent ev) {
+ return mDetector.onTouchEvent(ev) || super.onTouchEvent(ev);
+ }
+}
+</pre>
+
+<p>When the system detects a long press gesture, <code>DismissOverlayView</code> shows an
+<strong>Exit</strong> button, which terminates your activity if the user presses it.</p>
\ No newline at end of file
diff --git a/docs/html/training/wearables/ui/index.jd b/docs/html/training/wearables/ui/index.jd
new file mode 100644
index 0000000..8ef6fe7
--- /dev/null
+++ b/docs/html/training/wearables/ui/index.jd
@@ -0,0 +1,57 @@
+page.title=Creating Custom UIs for Wear Devices
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+ <h2>Dependencies and Prerequisites</h2>
+ <ul>
+ <li>Android Studio 0.8 or later and Gradle 0.12 or later</li>
+ </ul>
+</div>
+</div>
+
+<p>User interfaces for wearable apps differ significantly from those built for handheld devices.
+Apps for wearables should follow the Android Wear <a href="{@docRoot}design/wear/index.html">design
+principles</a> and implement the recommended <a href="{@docRoot}design/wear/patterns.html">UI
+patterns</a>, which ensure a consistent user experience across apps that is optimized for
+wearables.</a>
+
+<p>This class teaches you how to create custom UIs for your
+<a href="{@docRoot}training/wearables/apps/creating.html">wearable apps</a> and
+<a href="{@docRoot}training/wearables/apps/layouts.html#CustomNotifications">custom
+notifications</a> that look good on any Android Wear device by implementing these
+UI patterns:</p>
+
+<ul>
+<li>Cards</li>
+<li>Countdowns and confirmations</li>
+<li>Long press to dismiss</li>
+<li>2D Pickers</li>
+<li>Selection lists</li>
+</ul>
+
+<p>The Wearable UI Library, which is part of the Google Repository in the Android SDK,
+provides classes that help you implement these patterns and create layouts that work on
+both round and square Android Wear devices.</p>
+
+<p class="note"><b>Note:</b> We recommend using Android Studio for Android Wear development
+as it provides project setup, library inclusion, and packaging conveniences that aren't available
+in ADT. This training assumes you are using Android Studio.</p>
+
+<h2>Lessons</h2>
+
+<dl>
+ <dt><a href="{@docRoot}training/wearables/ui/layouts.html">Defining Layouts</a></dt>
+ <dd>Learn how to create layouts that look good on round and square Android Wear devices.</dd>
+ <dt><a href="{@docRoot}training/wearables/ui/cards.html">Creating Cards</a></dt>
+ <dd>Learn how to create cards with custom layouts.</dd>
+ <dt><a href="{@docRoot}training/wearables/ui/lists.html">Creating Lists</a></dt>
+ <dd>Learn how to create lists that are optimized for wearable devices.</dd>
+ <dt><a href="{@docRoot}training/wearables/ui/2d-picker.html">Creating a 2D Picker</a></dt>
+ <dd>Learn how to implement the 2D Picker UI pattern to navigate through pages of data.</dd>
+ <dt><a href="{@docRoot}training/wearables/ui/confirm.html">Showing Confirmations</a></dt>
+ <dd>Learn how to display confirmation animations when users complete actions.</dd>
+ <dt><a href="{@docRoot}training/wearables/ui/exit.html">Exiting Full-Screen Activities</a></dt>
+ <dd>Learn how to implement the long-press-to-dismiss UI pattern to exit full-screen activities.</dd>
+</dl>
\ No newline at end of file
diff --git a/docs/html/training/wearables/ui/layouts.jd b/docs/html/training/wearables/ui/layouts.jd
new file mode 100644
index 0000000..14b9403
--- /dev/null
+++ b/docs/html/training/wearables/ui/layouts.jd
@@ -0,0 +1,261 @@
+page.title=Defining Layouts
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#add-library">Add the Wearable UI Library</a></li>
+ <li><a href="#different-layouts">Specify Different Layouts for Square and Round Screens</a></li>
+ <li><a href="#same-layout">Use a Shape-Aware Layout</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}design/wear/index.html">Android Wear Design Principles</a></li>
+</ul>
+<h2>Video</h2>
+<ul>
+ <li><a href="https://www.youtube.com/watch?v=naf_WbtFAlY">Full Screen Apps for Android Wear</a></li>
+</ul>
+</div>
+</div>
+
+<p>Wearables use the same layout techniques as handheld Android devices, but need to be designed
+with specific constraints. Do not port functionality and the UI from a handheld app and expect a
+good experience. For more information on how to design great wearable apps, read the
+<a href="{@docRoot}design/wear/index.html">Android Wear Design Guidelines</a>.</p>
+
+<p>When you create layouts for Android Wear apps, you need to account for devices with square
+and round screens. Any content placed near the corners of the screen may be cropped on round
+Android Wear devices, so layouts designed for square screens do not work well on round devices.
+For a demonstration of this type of problem, see the video
+<a href="https://www.youtube.com/watch?v=naf_WbtFAlY">Full Screen Apps for Android Wear</a>.</p>
+
+<p>For example, figure 1 shows how the following layout looks on square and round screens:</p>
+
+<img src="{@docRoot}wear/images/01_uilib.png" alt="" width="500" height="261"/>
+<p class="img-caption"><strong>Figure 1.</strong> Demonstration of how a layout designed for
+square screens does not work well on round screens.</p>
+
+<pre>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/hello_square" />
+</LinearLayout>
+</pre>
+
+<p>The text does not display correctly on devices with round screens.</p>
+
+<p>The Wearable UI Library provides two different approaches to solve this problem:</p>
+
+<ul>
+<li>Define different layouts for square and round devices. Your app detects the shape
+ of the device screen and inflates the correct layout at runtime.</li>
+<li>Use a special layout included in the library for both square and round devices. This layout
+ applies different window insets depending on the shape of the device screen.</li>
+</ul>
+
+<p>You typically use the first approach when you want your app to look different depending on
+the shape of the device screen. You use the second approach when you want to use a similar layout
+on both screen shapes without having views cropped near the edges of round screens.</p>
+
+
+<h2 id="add-library">Add the Wearable UI Library</h2>
+
+<p>Android Studio includes the Wearable UI Library on your <code>wear</code> module by default
+when you use the Project Wizard. To compile your project with this library, ensure that the
+<em>Extras</em> > <em>Google Repository</em> package is installed in
+the Android SDK manager and that the following dependency is included in the
+<code>build.gradle</code> file of your <code>wear</code> module:</p>
+
+<pre>
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ <strong>compile 'com.google.android.support:wearable:+'</strong>
+ compile 'com.google.android.gms:play-services-wearable:+'
+}
+</pre>
+
+<p>The <code>'com.google.android.support:wearable'</code> dependency is required to implement
+the layout techniques shown in the following sections.</p>
+
+<p><a href="/shareables/training/wearable-support-docs.zip">Download the full API
+reference documentation</a> for the Wearable UI Library classes.</p>
+
+
+<h2 id="different-layouts">Specify Different Layouts for Square and Round Screens</h2>
+
+<p>The <code>WatchViewStub</code> class included in the Wearable UI Library lets you specify
+different layout definitions for square and round screens. This class detects the screen shape
+at runtime and inflates the corresponding layout.</p>
+
+<p>To use this class for handling different screen shapes in your app:</p>
+
+<ol>
+<li>Add <code>WatchViewStub</code> as the main element of your activity's layout.</li>
+<li>Specify a layout definition file for square screens with the <code>rectLayout</code>
+ attribute.</li>
+<li>Specify a layout definition file for round screens with the <code>roundLayout</code>
+ attribute.</li>
+</ol>
+
+<p>Define your activity's layout as follows:</p>
+
+<pre>
+<android.support.wearable.view.WatchViewStub
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/watch_view_stub"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ <strong>app:rectLayout="@layout/rect_activity_wear"</strong>
+ <strong>app:roundLayout="@layout/round_activity_wear"</strong>>
+</android.support.wearable.view.WatchViewStub>
+</pre>
+
+<p>Inflate this layout in your activity:</p>
+
+<pre>
+@Override
+protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_wear);
+}
+</pre>
+
+<p>Then create different layout definition files for square and round screens. In this example,
+you need to create the files <code>res/layout/rect_activity_wear.xml</code> and
+<code>res/layout/round_activity_wear.xml</code>. You define these layouts in the same way that
+you create layouts for handheld apps, but taking into account the constraints of wearable devices.
+The system inflates the correct layout at runtime depending on the screen shape.</p>
+
+<h3>Accessing layout views</h3>
+
+<p>The layouts that you specify for square or round screens are not inflated until
+<code>WatchViewStub</code> detects the shape of the screen, so your app cannot access their views
+immediately. To access these views, set a listener in your activity to be notified when
+the shape-specific layout has been inflated:</p>
+
+<pre>
+@Override
+protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_wear);
+
+ WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
+ stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
+ @Override public void onLayoutInflated(WatchViewStub stub) {
+ // Now you can access your views
+ TextView tv = (TextView) stub.findViewById(R.id.text);
+ ...
+ }
+ });
+}
+</pre>
+
+
+<h2 id="same-layout">Use a Shape-Aware Layout</h2>
+
+<div style="float:right;margin-left:25px;width:250px">
+<img src="{@docRoot}wear/images/02_uilib.png" width="250" height="250" alt=""/>
+<p class="img-caption"><strong>Figure 2.</strong> Window insets on a round screen.</p>
+</div>
+
+<p>The <code>BoxInsetLayout</code> class included in the Wearable UI Library extends
+{@link android.widget.FrameLayout} and lets you define a single layout that works for both square
+and round screens. This class applies the required window insets depending on the screen shape
+and lets you easily align views on the center or near the edges of the screen.</p>
+
+<p>The gray square in figure 2 shows the area where <code>BoxInsetLayout</code> can automatically
+place its child views on round screens after applying the required window insets. To be displayed
+inside this area, children views specify the <code>layout_box</code> atribute with these values:
+</p>
+
+<ul>
+<li>A combination of <code>top</code>, <code>bottom</code>, <code>left</code>, and
+ <code>right</code>. For example, <code>"left|top"</code> positions the child's left and top
+ edges inside the gray square in figure 2.</li>
+<li>The <code>all</code> value positions all the child's content inside the gray square in
+ figure 2.</li>
+</ul>
+
+<p>On square screens, the window insets are zero and the <code>layout_box</code> attribute is
+ignored.</p>
+
+<img src="{@docRoot}wear/images/03_uilib.png" width="500" height="253" alt=""/>
+<p class="img-caption"><strong>Figure 3.</strong> A layout definition that works on both
+square and round screens.</p>
+
+<p>The layout shown in figure 3 uses <code>BoxInsetLayout</code> and works on square and
+round screens:</p>
+
+<pre>
+<<strong>android.support.wearable.view.BoxInsetLayout</strong>
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ <strong>android:background="@drawable/robot_background"</strong>
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ <strong>android:padding="15dp"</strong>>
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ <strong>android:padding="5dp"</strong>
+ <strong>app:layout_box="all"</strong>>
+
+ <TextView
+ android:gravity="center"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/sometext"
+ android:textColor="@color/black" />
+
+ <ImageButton
+ android:background="@null"
+ android:layout_gravity="bottom|left"
+ android:layout_height="50dp"
+ android:layout_width="50dp"
+ android:src="@drawable/ok" />
+
+ <ImageButton
+ android:background="@null"
+ android:layout_gravity="bottom|right"
+ android:layout_height="50dp"
+ android:layout_width="50dp"
+ android:src="@drawable/cancel" />
+ </FrameLayout>
+</android.support.wearable.view.BoxInsetLayout>
+</pre>
+
+<p>Notice the parts of the layout marked in bold:</p>
+
+<ul>
+<li>
+ <p><code>android:padding="15dp"</code></p>
+ <p>This line assigns padding to the <code>BoxInsetLayout</code> element. Because the window
+ insets on round devices are larger than 15dp, this padding only applies to square screens.</p>
+</li>
+<li>
+ <p><code>android:padding="5dp"</code></p>
+ <p>This line assigns padding to the inner <code>FrameLayout</code> element. This padding applies
+ to both square and round screens. The total padding between the buttons and the window insets
+ is 20 dp on square screens (15+5) and 5 dp on round screens.</p>
+</li>
+<li>
+ <p><code>app:layout_box="all"</code></p>
+ <p>This line ensures that the <code>FrameLayout</code> element and its children are boxed inside
+ the area defined by the window insets on round screens. This line has no effect on square
+ screens.</p>
+</li>
+</ul>
\ No newline at end of file
diff --git a/docs/html/training/wearables/ui/lists.jd b/docs/html/training/wearables/ui/lists.jd
new file mode 100644
index 0000000..5458541
--- /dev/null
+++ b/docs/html/training/wearables/ui/lists.jd
@@ -0,0 +1,304 @@
+page.title=Creating Lists
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#add-list">Add a List View</a></li>
+ <li><a href="#layout-impl">Create a Layout Implementation for List Items</a></li>
+ <li><a href="#layout-def">Create a Layout Definition for Items</a></li>
+ <li><a href="#adapter">Create an Adapter to Populate the List</a></li>
+ <li><a href="#adapter-listener">Associate the Adapter and Set a Click Listener</a></li>
+</ol>
+<h2>You should also read</h2>
+<ul>
+ <li><a href="{@docRoot}design/wear/index.html">Android Wear Design Principles</a></li>
+</ul>
+</div>
+</div>
+
+
+<p>Lists let users select an item from a set of choices easily on wearable devices. This lesson
+shows you how to create lists in your Android Wear apps.</p>
+
+<p>The Wearable UI Library includes the <code>WearableListView</code> class, which is a list
+implementation optimized for wearable devices..</p>
+
+<p class="note"><strong>Note:</strong> The <em>Notifications</em> sample in the Android SDK
+demonstrates how to use <code>WearableListView</code> in your apps. This sample is located in
+the <code>android-sdk/samples/android-20/wearable/Notifications</code> directory.</p>
+
+<p>To create a list in your Android Wear apps:</p>
+
+<ol>
+<li>Add a <code>WearableListView</code> element to your activity's layout definition.</li>
+<li>Create a custom layout implementation for your list items.</li>
+<li>Use this implementation to create a layout definition file for your list items.</li>
+<div style="float:right;margin-left:25px;width:215px;margin-top:-20px">
+<img src="{@docRoot}wear/images/06_uilib.png" width="200" height="200" alt=""/>
+<p class="img-caption" style="text-align:center"><strong>Figure 3:</strong>
+A list view on Android Wear.</p>
+</div>
+<li>Create an adapter to populate the list.</li>
+<li>Assign the adapter to the <code>WearableListView</code> element.</li>
+</ol>
+
+<p>These steps are described in detail in the following sections.</p>
+
+
+<h2 id="add-list">Add a List View</h2>
+
+<p>The following layout adds a list view to an activity using a <code>BoxInsetLayout</code>, so
+the list is displayed properly on both round and square devices:</p>
+
+<pre>
+<android.support.wearable.view.BoxInsetLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:background="@drawable/robot_background"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+
+ <FrameLayout
+ android:id="@+id/frame_layout"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ app:layout_box="left|bottom|right">
+
+ <<strong>android.support.wearable.view.WearableListView</strong>
+ android:id="@+id/wearable_list"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+ </android.support.wearable.view.WearableListView>
+ </FrameLayout>
+</android.support.wearable.view.BoxInsetLayout>
+</pre>
+
+
+<h2 id="layout-impl">Create a Layout Implementation for List Items</h2>
+
+<p>In many cases, each list item consists of an icon and a description. The
+<em>Notifications</em> sample from the Android SDK implements a custom layout that extends
+{@link android.widget.LinearLayout} to incorporate these two elements inside each list item.
+This layout also implements the methods in the <code>WearableListView.Item</code> interface
+to animate the item's icon and fade the text in response to events from
+<code>WearableListView</code> as the user scrolls through the list.</p>
+
+<pre>
+public class WearableListItemLayout extends LinearLayout
+ implements WearableListView.Item {
+
+ private final float mFadedTextAlpha;
+ private final int mFadedCircleColor;
+ private final int mChosenCircleColor;
+ private ImageView mCircle;
+ private float mScale;
+ private TextView mName;
+
+ public WearableListItemLayout(Context context) {
+ this(context, null);
+ }
+
+ public WearableListItemLayout(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public WearableListItemLayout(Context context, AttributeSet attrs,
+ int defStyle) {
+ super(context, attrs, defStyle);
+ mFadedTextAlpha = getResources()
+ .getInteger(R.integer.action_text_faded_alpha) / 100f;
+ mFadedCircleColor = getResources().getColor(R.color.grey);
+ mChosenCircleColor = getResources().getColor(R.color.blue);
+ }
+
+ // Get references to the icon and text in the item layout definition
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+ // These are defined in the layout file for list items
+ // (see next section)
+ mCircle = (ImageView) findViewById(R.id.circle);
+ mName = (TextView) findViewById(R.id.name);
+ }
+
+ // Provide scaling values for WearableListView animations
+ @Override
+ public float getProximityMinValue() {
+ return 1f;
+ }
+
+ @Override
+ public float getProximityMaxValue() {
+ return 1.6f;
+ }
+
+ @Override
+ public float getCurrentProximityValue() {
+ return mScale;
+ }
+
+ // Scale the icon for WearableListView animations
+ @Override
+ public void setScalingAnimatorValue(float scale) {
+ mScale = scale;
+ mCircle.setScaleX(scale);
+ mCircle.setScaleY(scale);
+ }
+
+ // Change color of the icon, remove fading from the text
+ @Override
+ public void onScaleUpStart() {
+ mName.setAlpha(1f);
+ ((GradientDrawable) mCircle.getDrawable()).setColor(mChosenCircleColor);
+ }
+
+ // Change the color of the icon, fade the text
+ @Override
+ public void onScaleDownStart() {
+ ((GradientDrawable) mCircle.getDrawable()).setColor(mFadedCircleColor);
+ mName.setAlpha(mFadedTextAlpha);
+ }
+}
+</pre>
+
+
+<h2 id="layout-def">Create a Layout Definition for Items</h2>
+
+<p>After you implement a custom layout for list items, you provide a layout definition file that
+specifies the layout parameters of each of the components inside a list item. The following layout
+definition uses the custom layout implementation from the previous section and defines an icon
+and a text view whose IDs match those in the layout implementation class:</p>
+
+<pre>
+<-- res/layout/list_item.xml -->
+<com.example.android.support.wearable.notifications.WearableListItemLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:gravity="center_vertical"
+ android:layout_width="match_parent"
+ android:layout_height="80dp">
+ <ImageView
+ android:id="@+id/circle"
+ android:layout_height="20dp"
+ android:layout_margin="16dp"
+ android:layout_width="20dp"
+ android:src="@drawable/wl_circle"/>
+ <TextView
+ android:id="@+id/name"
+ android:gravity="center_vertical|left"
+ android:layout_width="wrap_content"
+ android:layout_marginRight="16dp"
+ android:layout_height="match_parent"
+ android:fontFamily="sans-serif-condensed-light"
+ android:lineSpacingExtra="-4sp"
+ android:textColor="@color/text_color"
+ android:textSize="16sp"/>
+</com.example.android.support.wearable.notifications.WearableListItemLayout>
+</pre>
+
+
+<h2 id="adapter">Create an Adapter to Populate the List</h2>
+
+<p>The adapter populates the <code>WearableListView</code> with content. The following simple
+adapter populates the list with elements based on an array of strings:</p>
+
+<pre>
+private static final class Adapter extends WearableListView.Adapter {
+ private String[] mDataset;
+ private final Context mContext;
+ private final LayoutInflater mInflater;
+
+ // Provide a suitable constructor (depends on the kind of dataset)
+ public Adapter(Context context, String[] dataset) {
+ mContext = context;
+ mInflater = LayoutInflater.from(context);
+ mDataset = dataset;
+ }
+
+ // Provide a reference to the type of views you're using
+ public static class ItemViewHolder extends WearableListView.ViewHolder {
+ private TextView textView;
+ public ItemViewHolder(View itemView) {
+ super(itemView);
+ // find the text view within the custom item's layout
+ textView = (TextView) itemView.findViewById(R.id.name);
+ }
+ }
+
+ // Create new views for list items
+ // (invoked by the WearableListView's layout manager)
+ @Override
+ public WearableListView.ViewHolder onCreateViewHolder(ViewGroup parent,
+ int viewType) {
+ // Inflate our custom layout for list items
+ return new ItemViewHolder(mInflater.inflate(R.layout.list_item, null));
+ }
+
+ // Replace the contents of a list item
+ // Instead of creating new views, the list tries to recycle existing ones
+ // (invoked by the WearableListView's layout manager)
+ @Override
+ public void onBindViewHolder(WearableListView.ViewHolder holder,
+ int position) {
+ // retrieve the text view
+ ItemViewHolder itemHolder = (ItemViewHolder) holder;
+ TextView view = itemHolder.textView;
+ // replace text contents
+ view.setText(mDataset[position]);
+ // replace list item's metadata
+ holder.itemView.setTag(position);
+ }
+
+ // Return the size of your dataset
+ // (invoked by the WearableListView's layout manager)
+ @Override
+ public int getItemCount() {
+ return mDataset.length;
+ }
+}
+</pre>
+
+
+<h2 id="adapter-listener">Associate the Adapter and Set a Click Listener</h2>
+
+<p>In your activity, obtain a reference to the <code>WearableListView</code> element from
+your layout, assign an instance of the adapter to populate the list, and set a click listener
+to complete an action when the user selects a particular list item.</p>
+
+<pre>
+public class WearActivity extends Activity
+ implements WearableListView.ClickListener {
+
+ // Sample dataset for the list
+ String[] elements = { "List Item 1", "List Item 2", ... };
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.my_list_activity);
+
+ // Get the list component from the layout of the activity
+ WearableListView listView =
+ (WearableListView) findViewById(R.id.wearable_list);
+
+ // Assign an adapter to the list
+ listView.setAdapter(new Adapter(this, elements));
+
+ // Set a click listener
+ listView.setClickListener(this);
+ }
+
+ // WearableListView click listener
+ @Override
+ public void onClick(WearableListView.ViewHolder v) {
+ Integer tag = (Integer) v.itemView.getTag();
+ // use this data to complete some action ...
+ }
+
+ @Override
+ public void onTopEmptyRegionClick() {
+ }
+}
+</pre>
diff --git a/docs/html/wear/images/01_uilib.png b/docs/html/wear/images/01_uilib.png
new file mode 100644
index 0000000..14484d6
--- /dev/null
+++ b/docs/html/wear/images/01_uilib.png
Binary files differ
diff --git a/docs/html/wear/images/02_uilib.png b/docs/html/wear/images/02_uilib.png
new file mode 100644
index 0000000..39896a1
--- /dev/null
+++ b/docs/html/wear/images/02_uilib.png
Binary files differ
diff --git a/docs/html/wear/images/03_uilib.png b/docs/html/wear/images/03_uilib.png
new file mode 100644
index 0000000..ebf635d
--- /dev/null
+++ b/docs/html/wear/images/03_uilib.png
Binary files differ
diff --git a/docs/html/wear/images/04_uilib.png b/docs/html/wear/images/04_uilib.png
new file mode 100644
index 0000000..e5a29a0
--- /dev/null
+++ b/docs/html/wear/images/04_uilib.png
Binary files differ
diff --git a/docs/html/wear/images/05_uilib.png b/docs/html/wear/images/05_uilib.png
new file mode 100644
index 0000000..25d2e34
--- /dev/null
+++ b/docs/html/wear/images/05_uilib.png
Binary files differ
diff --git a/docs/html/wear/images/06_uilib.png b/docs/html/wear/images/06_uilib.png
new file mode 100644
index 0000000..257bb82
--- /dev/null
+++ b/docs/html/wear/images/06_uilib.png
Binary files differ
diff --git a/docs/html/wear/images/07_uilib.png b/docs/html/wear/images/07_uilib.png
new file mode 100644
index 0000000..ce1a80c
--- /dev/null
+++ b/docs/html/wear/images/07_uilib.png
Binary files differ
diff --git a/docs/html/wear/images/08_uilib.png b/docs/html/wear/images/08_uilib.png
new file mode 100644
index 0000000..b44522b
--- /dev/null
+++ b/docs/html/wear/images/08_uilib.png
Binary files differ
diff --git a/docs/html/wear/images/09_uilib.png b/docs/html/wear/images/09_uilib.png
new file mode 100644
index 0000000..f8234e1
--- /dev/null
+++ b/docs/html/wear/images/09_uilib.png
Binary files differ
diff --git a/location/java/android/location/package.html b/location/java/android/location/package.html
index 81fcea4..2355e72 100644
--- a/location/java/android/location/package.html
+++ b/location/java/android/location/package.html
@@ -1,22 +1,20 @@
<html>
<body>
-<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>Contains the framework API classes that define Android location-based and
+ related services.</p>
+<p class="warning">
+<strong>This API is not the recommended method for accessing Android location.</strong><br>
+The
+<a href="{@docRoot}reference/com/google/android/gms/location/package-summary.html">Google Location Services API</a>,
+part of Google Play services, is the preferred way to add location-awareness to
+your app. It offers a simpler API, higher accuracy, low-power geofencing, and
+more. If you are currently using the android.location API, you are strongly
+encouraged to switch to the Google Location Services API as soon as
+possible.
+<br><br>
+To learn more about the Google Location Services API, see the
+<a href="{@docRoot}google/play-services/location.html">Location API overview</a>.
</p>
-
-<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}
-
</body>
</html>