docs: revisions to GPS Setup page w/ note about emulator

Change-Id: I19400813a0220892654e38fa5142d9f8526a639c
This commit is contained in:
Scott Main
2012-12-03 15:09:16 -08:00
parent 2db56ddaee
commit a06c294152
2 changed files with 48 additions and 27 deletions

View File

@ -30,7 +30,7 @@ track app usage, and enhance your app with features such as maps, sign-in, and
cloud messaging.</p> cloud messaging.</p>
<p>Although these Google services are not included in the Android platform, they are <p>Although these Google services are not included in the Android platform, they are
supported by most Android-powered devices. When using these services, you can supported by most Android-powered devices. When using these services, you can
distribute your app to all device with Google Play running Android 2.2 distribute your app on Google Play to all devices running Android 2.2
or higher, and some services support even more devices.</p> or higher, and some services support even more devices.</p>
</div> </div>
</div> </div>

View File

@ -8,34 +8,55 @@ page.title=Setup
Manager</a>. The download includes the client library and code samples. Manager</a>. The download includes the client library and code samples.
</p> </p>
<p> <p>You must download the Google Play services SDK in order to develop using the
To set up the Google Play services SDK: <a href="{@docRoot}reference/gms-packages.html">Google Play services APIs</a>. However, <strong>you
</p> cannot use the Android emulator</strong> to test an app that depends on the Google Play services
APIs&mdash;you must use a real device running Android 2.2 or higher that includes
Google Play Store.</p>
<p>To install the Google Play services SDK for development:</p>
<ol> <ol>
<li> <li>Launch the SDK Manager.
Launch Eclipse and select <b>Window &gt; Android SDK Manager</b> or run <code>android</code> <ul>
at the command line. <li>From Eclipse (with <a href="{@docRoot}tools/help/adt.html">ADT</a>),
</li> select <strong>Window</strong> &gt; <strong>Android SDK Manager</strong>.</li>
<li> <li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
Scroll to the bottom of the package list and select <b>Extras &gt; Google Play services</b>. SDK directory.</li>
The Google Play services SDK is downloaded to your computer and installed in your Android SDK environment at <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
<code>&lt;android-sdk-folder&gt;/extras/google/google_play_services/</code>. Android SDK, then execute <code>android sdk</code>.</li>
</li> </ul>
<li>Copy the <code>&lt;android-sdk-folder&gt;/extras/google/google_play_services/libproject/google-play-services_lib</code> </li>
library project to a location in your project's source tree. <li>
<p>If you are using Eclipse, import the library project into your workspace. Click <b>File > Import...</b>, select <b>Android > Existing Scroll to the bottom of the package list, select <b>Extras &gt; Google Play services</b>,
Android Code into Workspace</b>, and browse to the copy of the library project to import it.</p> and install it.
</li> <p>The Google Play services SDK is saved in your Android SDK environment at
<li>Reference the library project in your Android project. <code>&lt;android-sdk-folder&gt;/extras/google/google_play_services/</code>.</p>
<p>See the </li>
<a href="{@docRoot}tools/projects/projects-eclipse.html#ReferencingLibraryProject">Referencing a Library Project for Eclipse</a> <li>Copy the <code>&lt;android-sdk-folder&gt;/extras/google/google_play_services/libproject/google-play-services_lib</code>
or <a href="{@docRoot}tools/projects/projects-cmdline.html#ReferencingLibraryProject">Referencing a Library Project on the Command Line</a> library project into the source tree where you maintain your Android app projects.
for more information on how to do this.</p> <p>If you are using Eclipse, import the library project into your workspace. Click <b>File > Import</b>, select <b>Android > Existing
</li> Android Code into Workspace</b>, and browse to the copy of the library project to import it.</p>
<li>If you are using <a href="{@docRoot}tools/help/proguard.html">ProGuard</a>, add the following </li>
lines in the <code>&lt;project_directory&gt;/proguard-project.txt</code> file </ol>
to prevent ProGuard from stripping away required classes:
<p>To set up a project to use the Google Play services SDK:</p>
<ol>
<li>Reference the library project in your Android project.
<p>See the
<a href="{@docRoot}tools/projects/projects-eclipse.html#ReferencingLibraryProject">Referencing a Library Project for Eclipse</a>
or <a href="{@docRoot}tools/projects/projects-cmdline.html#ReferencingLibraryProject">Referencing a Library Project on the Command Line</a>
for more information on how to do this.</p>
<p class="note"><strong>Note:</strong>
You should be referencing a copy of the library that you copied to your
source tree&mdash;you should not reference the library from the Android SDK directory.</p>
</li>
<li>If you are using <a href="{@docRoot}tools/help/proguard.html">ProGuard</a>, add the following
lines in the <code>&lt;project_directory&gt;/proguard-project.txt</code> file
to prevent ProGuard from stripping away required classes:
<pre> <pre>
-keep class * extends java.util.ListResourceBundle { -keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents(); protected Object[][] getContents();