summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmain@google.com <smain@google.com>2014-06-16 20:12:30 -0700
committersmain@google.com <smain@google.com>2014-06-16 20:12:30 -0700
commit7332669e396054573b4cbbb07e9890e21f57f896 (patch)
tree988da00e82ab5b3540b4f148d4112209db209f2a
parentd3843038b93e91681a6f40633efeca8b41edc055 (diff)
downloadframeworks_base-7332669e396054573b4cbbb07e9890e21f57f896.zip
frameworks_base-7332669e396054573b4cbbb07e9890e21f57f896.tar.gz
frameworks_base-7332669e396054573b4cbbb07e9890e21f57f896.tar.bz2
add toggle for IDE instructions, revise some titles and other cleanup to Google API setup
Change-Id: Ic2454824adddb80ac844939f165cc68fc52a7005
-rw-r--r--docs/html/google/auth/api-client.jd2
-rw-r--r--docs/html/google/google_toc.cs8
-rw-r--r--docs/html/google/play-services/setup.jd97
-rw-r--r--docs/html/sdk/installing/adding-packages.jd14
-rw-r--r--docs/html/sdk/installing/studio.jd2
5 files changed, 46 insertions, 77 deletions
diff --git a/docs/html/google/auth/api-client.jd b/docs/html/google/auth/api-client.jd
index 402a95f..5331d1e 100644
--- a/docs/html/google/auth/api-client.jd
+++ b/docs/html/google/auth/api-client.jd
@@ -1,4 +1,4 @@
-page.title=Accessing Google Play Services APIs
+page.title=Accessing Google APIs
page.tags="oauth 2.0","GoogleAuthUtil"
trainingnavtop=true
diff --git a/docs/html/google/google_toc.cs b/docs/html/google/google_toc.cs
index 6ff00c0..b4028bd 100644
--- a/docs/html/google/google_toc.cs
+++ b/docs/html/google/google_toc.cs
@@ -3,11 +3,11 @@
######## ATTENTION ###############
######## ###############
#########################################################
-
+
IF YOU MAKE CHANGES TO THIS FILE, YOU MUST GENERATE THE
GMS REFERENCE DOCS, BECAUSE THEY ARE NOT INCLUDED IN THE
DOCS BUILD RULE.
-
+
#########################################################
#########################################################
?>
@@ -73,11 +73,11 @@
</div>
<ul>
<li><a href="<?cs var:toroot?>google/play-services/setup.html">
- <span class="en">Setup</span></a>
+ <span class="en">Setting Up Google Play Services</span></a>
</li>
<li class="nav-section">
<div class="nav-section-header"><a href="<?cs var:toroot?>google/auth/api-client.html">
- <span class="en">Accessing Google Play Services APIs</span></a>
+ <span class="en">Accessing Google APIs</span></a>
</div>
<ul>
<li>
diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd
index 744e191..049e6fe 100644
--- a/docs/html/google/play-services/setup.jd
+++ b/docs/html/google/play-services/setup.jd
@@ -1,4 +1,4 @@
-page.title=Set Up Google Play Services SDK
+page.title=Setting Up Google Play Services
@jd:body
@@ -9,7 +9,7 @@ page.title=Set Up Google Play Services SDK
<h2>In this document</h2>
<ol>
<li><a href="#Install">Install the Google Play Services SDK</a></li>
- <li><a href="#Setup">Set Up a Project that Uses Google Play Services</a></li>
+ <li><a href="#Setup">Add Google Play Services to Your Project</a></li>
<li><a href="#Proguard">Create a Proguard Exception</a></li>
<li><a href="#ensure">Ensure Devices Have the Google Play services APK</a></li>
</ol>
@@ -18,12 +18,17 @@ page.title=Set Up Google Play Services SDK
</div>
</div>
+<script>
+$(document).ready(function() {
+ setupIdeDocToggle();
+});
+</script>
+
-
<p>To develop an app using the <a href="{@docRoot}reference/gms-packages.html">Google
-Play services APIs</a>, you must download the Google Play services SDK
-from the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.
-The download includes the client library and code samples.</p>
+Play services APIs</a>, you need to set up your project with the Google Play services SDK.
+<p>If you haven't installed the Google Play services SDK yet, go get it now by following the guide
+to <a href="{@docRoot}sdk/installing/adding-packages.html">Adding SDK Packages</a>.</p>
<p>To test your app when using the Google Play services SDK, you must use either:</p>
<ul>
@@ -33,68 +38,25 @@ The download includes the client library and code samples.</p>
that runs the Google APIs platform based on Android 4.2.2 or higher.</li>
</ul>
-<p>Ideally, you should develop and test your app on a variety of devices, including
-both phones and tablets.</p>
-
-
-<h2 id="Install">Install the Google Play Services SDK</h2>
-
-<p>To install the Google Play services SDK for development:</p>
-<ol>
- <li>Launch the SDK Manager in one of the following ways:
- <ul>
- <li>In Android Studio, click <strong>SDK Manager</strong>
-<img src="{@docRoot}images/tools/sdk-manager-studio.png" style="vertical-align:bottom;margin:0;height:19px" />
-in the toolbar.</li>
- <li>In Eclipse (with <a href="{@docRoot}tools/help/adt.html">ADT</a>),
- select <strong>Window</strong> &gt; <strong>Android SDK Manager</strong>.</li>
- <li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
- SDK directory.</li>
- <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
- Android SDK, then execute <code>android sdk</code>.</li>
- </ul>
- </li>
- <li>Install the Google Play services SDK.
- <p>Scroll to the bottom of the package list, expand <b>Extras</b>, select
- <b>Google Play services</b>, and install it. If you're using Android Studio, also install
- <b>Google Repository</b> (it provides the Maven repository used for Gradle builds).</p>
- <p>The Google Play services SDK is saved in your Android SDK environment at
- <code>&lt;android-sdk&gt;/extras/google/google_play_services/</code>.</p>
-
-<p class="note"><strong>Note:</strong> Google Play services 4.0.30 (released
-November 2013) and newer versions require Android 2.3 or higher. If your app supports Android 2.2,
-you can continue development with the Google Play services SDK, but must instead install
-<b>Google Play services for Froyo</b> from the SDK Manager.</p>
-
- </li>
- <li>Install a compatible version of the Google APIs platform.
- <p>If you want to test your app on the emulator, expand the directory for <b>Android 4.2.2
- (API 17)</b> or a higher version, select <b>Google APIs</b>, and install it. Then create a
- new <a href="{@docRoot}tools/devices/index.html">AVD</a> with Google APIs as
- the platform target.</p>
- </li>
- <li>Make a copy of the Google Play services library project.
- <p class="note"><strong>Note:</strong> If you are using Android Studio, skip this step.</p>
- <p>Copy the library project at
- <code>&lt;android-sdk&gt;/extras/google/google_play_services/libproject/google-play-services_lib/</code>
- to the location where you maintain your Android app projects.
- <p>If you are using Eclipse, import the library project into your workspace.
- Click <b>File > Import</b>, select <b>Android > Existing
- Android Code into Workspace</b>, and browse to the copy of the library project to import it.</p>
- </li>
-</ol>
+<h2 id="Setup">Add Google Play Services to Your Project</h2>
+<p>
+<select class="ide">
+ <option value="eclipse">Using Eclipse with ADT</option>
+ <option value="studio">Using Android Studio</option>
+ <option value="other">Using something else</option>
+</select>
+</p>
-<h2 id="Setup">Set Up a Project that Uses Google Play Services</h2>
-<p><b>Using Android Studio:</b></p>
+<div class="select-ide studio">
<ol>
- <li>Open the <code>build.gradle</code> file inside your application module directory.
- <p class="note"><strong>Note:</strong> Android Studio projects contain a top-level
- <code>build.gradle</code> file and a <code>build.gradle</code> file for each module.
+ <li>Open the <code>build.gradle</code> file inside your application module directory.
+ <p class="note"><strong>Note:</strong> Android Studio projects contain a top-level
+ <code>build.gradle</code> file and a <code>build.gradle</code> file for each module.
Be sure to edit the file for your application module. See
<a href="{@docRoot}sdk/installing/studio-build.html">Building Your Project with
Gradle</a> for more information about Gradle.</p></li>
@@ -128,8 +90,11 @@ element:
<p>You can now begin developing features with the
<a href="{@docRoot}reference/gms-packages.html">Google Play services APIs</a>.</p>
+</div><!-- end studio -->
-<p><b>Using Eclipse or another IDE:</b></p>
+
+
+<div class="select-ide eclipse other">
<p>To make the Google Play services APIs available to your app, you must reference the library
project you created in step 4 of the <a href="#Install">installation instructions</a>.</p>
@@ -156,6 +121,9 @@ element:
you can begin developing features with the
<a href="{@docRoot}reference/gms-packages.html">Google Play services APIs</a>.</p>
+</div><!-- end eclipse and other -->
+
+
<h2 id="Proguard">Create a Proguard Exception</h2>
@@ -236,5 +204,6 @@ about the error and provides an action
that takes the user to Google Play Store to install the update.</p>
-<p>To then begin a connection to Google Play services, read <a
-href="{@docRoot}google/auth/api-client.html">Accessing Google Play Services APIs</a>.</p>
+<p>To then begin a connection to Google Play services (required by most Google APIs such
+as Google Drive, Google+, and Games), read <a
+href="{@docRoot}google/auth/api-client.html">Accessing Google APIs</a>.</p>
diff --git a/docs/html/sdk/installing/adding-packages.jd b/docs/html/sdk/installing/adding-packages.jd
index c38c927..f6435f7 100644
--- a/docs/html/sdk/installing/adding-packages.jd
+++ b/docs/html/sdk/installing/adding-packages.jd
@@ -14,7 +14,7 @@ ol.large > li {
background:#eee;
}
ol.large > li:nth-child(odd) {
-}
+}
ol.large > li:before {
display:inline;
left:-40px;
@@ -76,7 +76,7 @@ style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li>
<ol class="large">
<li>
- <h2 class="norule">Get the latest SDK tools</h2>
+ <h2 id="GetTools" class="norule">Get the latest SDK tools</h2>
<img src="/images/sdk_manager_packages.png" alt="" width="350" style="float:right;margin-left:20px" />
@@ -102,7 +102,7 @@ style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li>
</li>
<li>
- <h2 class="norule">Get the support library for additional APIs</h2>
+ <h2 id="GetSupportLib" class="norule">Get the support library for additional APIs</h2>
<div class="sidebox">
<h3>Why use the support library?</h3>
@@ -145,7 +145,7 @@ style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li>
<li>
- <h2 class="norule">Get Google Play services for even more APIs</h2>
+ <h2 id="GetGoogle" class="norule">Get Google Play services for even more APIs</h2>
<div class="sidebox">
<h3>Why use Google Play services?</h3>
@@ -182,7 +182,7 @@ style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li>
<li>
- <h2 class="norule">Build something!</h2>
+ <h2 id="Build" class="norule">Build something!</h2>
<p>With the above packages now in your Android SDK, you're ready to build apps
for Android. As new tools and other APIs become available, simply launch the SDK Manager
@@ -208,8 +208,8 @@ the guide to <strong><a href="{@docRoot}training/basics/firstapp/index.html"
<h3>Use Google APIs</h3>
<p>To start using Google APIs, such as Maps or
Play Game services, see the guide to
-<strong><a href="{@docRoot}google/auth/api-client.html">Accessing Google Play Services
-APIs</a></strong>.</p>
+<strong><a href="{@docRoot}google/play-services/setup.html">Setting Up Google Play
+Services</a></strong>.</p>
</div>
</div><!-- end cols -->
diff --git a/docs/html/sdk/installing/studio.jd b/docs/html/sdk/installing/studio.jd
index af6bd75..c97afa5 100644
--- a/docs/html/sdk/installing/studio.jd
+++ b/docs/html/sdk/installing/studio.jd
@@ -619,7 +619,7 @@ for possible resolutions to known issues: <a href="http://tools.android.com/know
function onDownloadForRealz(link) {
if ($("input#agree").is(':checked')) {
- $("h1").text('Now downloading Android Studio...');
+ $("h1").text('Now redirecting to the install instructions...');
$("#tos").slideUp();
$("#jd-content .jd-descr").fadeOut('slow', function() {
setTimeout(function() {