From 85dd5ec6c042c4a5248de65d73b7f759549990d0 Mon Sep 17 00:00:00 2001 From: Scott Main Date: Fri, 24 May 2013 10:54:24 -0700 Subject: [PATCH] update GPS setup page to include emulator support. revise the doc layout with headings Change-Id: If063782474e4187779dbc1fd23743fa87a69d316 --- docs/html/google/play-services/setup.jd | 80 +++++++++++++++---------- 1 file changed, 49 insertions(+), 31 deletions(-) diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd index a960a181a7984..4d38850c67501 100644 --- a/docs/html/google/play-services/setup.jd +++ b/docs/html/google/play-services/setup.jd @@ -1,26 +1,25 @@ page.title=Setup Google Play Services SDK @jd:body - -

- The Google Play services SDK is an extension to the Android SDK and is available to you as a - downloadable package from the SDK - Manager. The download includes the client library and code samples. -

-

- To develop using the Google - Play services APIs, you must download the Google Play services SDK. - Additionally, you must provide a physical development device on - which you can run and debug your app. You can develop on any compatible Android - device that runs Android 2.2 or higher and includes the Google Play Store. - Ideally, you would develop and test the app on a variety of devices, including - both phones and tablets. -

+

To develop an app using the Google +Play services APIs, you must download the Google Play services SDK +from the SDK Manager. +The download includes the client library and code samples.

-

Note: Google Play services is not supported on the -Android emulator — to develop using the APIs, you need to provide a development -device such as an Android phone or tablet.

+

To test your app when using the Google Play services SDK, you must use either:

+ + +

Ideally, you should develop and test your app on a variety of devices, including +both phones and tablets.

+ + +

Install the Google Play Services SDK

To install the Google Play services SDK for development:

@@ -35,20 +34,34 @@ device such as an Android phone or tablet.

Android SDK, then execute android sdk. -
  • - Scroll to the bottom of the package list, select Extras > Google Play services, - and install it. +
  • Install the Google Play services SDK. +

    Scroll to the bottom of the package list, expand Extras, select + Google Play services, and install it.

    The Google Play services SDK is saved in your Android SDK environment at - <android-sdk-folder>/extras/google/google_play_services/.

    + <android-sdk>/extras/google/google_play_services/.

  • -
  • Copy the <android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib - library project into the source tree where you maintain your Android app projects. -

    If you are using Eclipse, import the library project into your workspace. Click File > Import, select Android > Existing +

  • Install a compatible version of the Google APIs platform. +

    If you want to test your app on the emulator, expand the directory for Android 4.2.2 + (API 17) or a higher version, select Google APIs, and install it. Then create a + new AVD with Google APIs as + the platform target.

    +

    Note: Only Android 4.2.2 and higher versions of the + Google APIs platform include Google Play services.

    +
  • +
  • Make a copy of the Google Play services library project. +

    Copy the library project at + <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ + to the location where you maintain your Android app projects. +

    If you are using Eclipse, import the library project into your workspace. + Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.

  • + +

    Set Up a Project with the Library

    +

    To set up a project to use the Google Play services SDK:

      @@ -58,8 +71,8 @@ device such as an Android phone or tablet.

      or Referencing a Library Project on the Command Line for more information on how to do this.

      Note: - You should be referencing a copy of the library that you copied to your - source tree—you should not reference the library from the Android SDK directory.

      + You should be referencing a copy of the library that you copied to your development + workspace—you should not reference the library directly from the Android SDK directory.

    1. If you are using ProGuard, add the following lines in the <project_directory>/proguard-project.txt file @@ -71,7 +84,14 @@ device such as an Android phone or tablet.

    -

    Ensuring Devices Have the Google Play services APK

    +

    Once you have the Google Play services library project added to your app project, +you can begin developing features with the +Google Play services APIs.

    + + + +

    Ensure Devices Have the Google Play services APK

    +

    As described in the Google Play services introduction, Google Play delivers service updates for users on Android 2.2 through the Google Play Store app. However, updates might not reach @@ -80,7 +100,7 @@ all users immediately.

    Important: Because it is hard to anticipate the state of each device, you must always check for a - compatible Google Play services APK in your app before you access Google Play services + compatible Google Play services APK before you access Google Play services features. For many apps, the best time to check is during the {@link android.app.Activity#onResume onResume()} method of the main activity.

    @@ -119,11 +139,9 @@ a user's device:

    Note: - The Google Play services APK is not visible by searching the Google Play Store. The client library provides a deep link into the Google Play Store when it detects that the device has a missing or incompatible Google Play services APK. -