From e36276ad976d77b53f1108277f40eca3eb5d5bee Mon Sep 17 00:00:00 2001
From: Scott Main Google offers a variety of services that help you
-enhance your app's capabilities, build new revenue streams, manage app distribution,
-and track app usage.Google Services
Because these services are offered directly by Google, they're not included in the Android platform. Some are provided by the Google Play service available on devices with Google Play, @@ -43,34 +44,34 @@ and track app usage.
The power of Google Maps is available to your app with an embeddable map view. You can customize the map with - markers and overlays, control the user's perspective, animate the camera, and much more.
+ markers and overlays, control the user's perspective, draw lines + and shapes, and much more.Authenticate your users by allowing them to sign in with Google+. - Provide +1 buttons that allow users to recommend your app content and build customized - content for posts on Google+.
+Authenticate users and allow them to sign in, add +1 buttons so users can + recommend your app content, and allow them to share your content on Google+.
Keep your users connected by delivering events with - lightweight messages immediately from your web server. There are no quotas or charges +
Immediately notify your users about timely events by delivering + lightweight messages from your web server. There are no quotas or charges to use Google Cloud Messaging.
Measure your success and gain deeper insights into how mobile users engage with your content -by integrating Google Analytics with your app.
+Measure your success and gain insights into how users engage with your app content +by integrating Google Analytics. You can track in-app purchases, the number of active users, +interaction patterns, and much more. +
Display ads from AdMob offer you an alternative revenue opportunity that leverages - multiple ad networks. + multiple ad networks with targeted ads and several display formats.
The Google Analytics Android APIs are part of the Google Play services platform.
-Download and configure - the SDK to begin integrating Google Analytics into your app. -
- -For instructions on how to fully integrate Google+ into your app, with code snippets, visit the - Google - Analytics developer documentation located at developers.google.com. -
- -- The Google - Analytics API reference as well as the entire Google - Play services platform reference is provided for you on this site. -
- -Call this method off of the main UI thread since it executes network transactions. An easy way to do this - is in an AsyncTask. + is in an {@link android.os.AsyncTask}. The sample in the Google Play services SDK shows you how to wrap this call in an AsyncTask. - If authentication is successful, the token is returned. If not, the exceptions described in Handling Exceptions + If authentication is successful, the token is returned. If not, the exceptions described in +Handling Exceptions are thrown that you can catch and handle appropriately.
If you are obtaining authentication tokens in a background service or sync adapter, there are three overloaded getTokenWithNotification()
methods
+
If you are obtaining authentication tokens in a background service or sync adapter, there + are three overloaded + {@code getTokenWithNotification()} methods that you can use:
android:exported
attribute to true
for the broadcast receiverandroid:exported
+ attribute to true
for the broadcast receiversyncBundle
parameter.See the sample in <android-sdk>/extras/google-play-services/samples/auth
for implementation details.
When requesting an authentication token with - GoogleAuthUtil.getToken(), + {@code GoogleAuthUtil.getToken()}, the following exceptions can be thrown:
getTokenWithNotification()
methods and if the error
+{@code UserRecoverableNotifiedException}:
+ This exception is thrown when the authorization fails using one of the
+{@code getTokenWithNotification()} methods and if the error
is recoverable with a user action.
For more information on how to handle these exceptions and code snippets, see the reference documentation for the -GoogleAuthUtil - class. +{@code +GoogleAuthUtil} class.
+ + + +Once you have successfully obtained a token, you can use it to access Google services. @@ -192,5 +226,7 @@ if (serverCode == 200) { Notice that you must manually invalidate the token if the response from the server signifies an authentication error (401). This could mean the authentication token being used is invalid for the service's scope or the token may have expired. If this is the - case, obtain a new token using GoogleAuthUtil.getToken(). + case, obtain a new token using {@code GoogleAuthUtil.getToken()}.
\ No newline at end of file diff --git a/docs/html/google/play-services/maps.jd b/docs/html/google/play-services/maps.jd index 69928f1..58f4c7d 100644 --- a/docs/html/google/play-services/maps.jd +++ b/docs/html/google/play-services/maps.jd @@ -17,7 +17,7 @@ header.hide=1 with image overlays, embed one or more maps as fragments, and much more.The Google Maps Android API reference is available here on developer.android.com, but for more information about adding maps to your app, visit:
Once you've installed the Google Play services package, the Google Maps sample is located in
<android-sdk>/extras/google-play-services/samples/maps
and shows you
how to use the major components of the Google Maps Android APIs.
Read the Google Maps + API Terms of Service.
+For quick access while developing your Android apps, the - Google Maps + Google Maps Android API reference is available here on developer.android.com.
-Extended documentation for the Google Maps Android APIs is provided with the rest of the + +
Detailed documentation for the Google Maps Android APIs is available with the rest of the Google Maps developer documents at developers.google.com/maps.
-Also read the Google Maps - API Terms of Service.
\ No newline at end of file diff --git a/docs/html/google/play-services/plus.jd b/docs/html/google/play-services/plus.jd index 1810843..f65abb4 100644 --- a/docs/html/google/play-services/plus.jd +++ b/docs/html/google/play-services/plus.jd @@ -18,7 +18,7 @@ header.hide=1 and allow users to share rich content with Google+.The Google+ Android API reference is available here on developer.android.com, but for more information about integrating Google+, visit:
Read the Google+ Platform + Terms of Service.
+For quick access while developing your Android apps, the - Google+ + Google+ API reference is available here on developer.android.com.
-Extended documentation for the Google+ Android APIs is provided with the rest of the + +
Detailed documentation for the Google+ Android APIs is available with the rest of the Google+ developer documents at developers.google.com/+.
-Also read the Google+ Platform - Terms of Service.
\ No newline at end of file diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd index eb3618b..ec5d26f 100644 --- a/docs/html/google/play-services/setup.jd +++ b/docs/html/google/play-services/setup.jd @@ -1,26 +1,11 @@ page.title=Setup @jd:body -The Google Play services SDK is an extension to the Android SDK and is available to you as a - downloadable SDK component. This download includes the client library and code samples. -
- -- Before you get started developing, make sure that you have an updated version of the Android SDK - installed on your computer, including the SDK Tools component. If you don't have the SDK, - visit the SDK Download page - on the Android Developers site. + downloadable package from the SDK + Manager. The download includes the client library and code samples.
@@ -38,14 +23,15 @@ page.title=Setup
<android-sdk-folder>/extras/google/google_play_services/
.
<android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib
- library project to a location in your project's source tree.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.
-See the Referencing a Library Project for Eclipse or Referencing a Library Project on the Command Line - for more information on how to do this. + for more information on how to do this.
<project_directory>/proguard-project.txt
file
@@ -58,19 +44,21 @@ page.title=Setup
- Google Play delivers updates to the majority of the devices that support Google Play services - (Android 2.2 devices with the Google Play Store app installed). However, updates might not reach - supported devices in a timely manner, which are desribed in the following four scenarios: -
+
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 +all users immediately.
+ +Important: - - Because it is hard to anticipate the state devices are in, you must always check for a - compatible Google Play services APK in your app when you are accessing Google Play services - features. For many apps, this is each time in the + 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 + features. For many apps, the best time to check is during the {@link android.app.Activity#onResume onResume()} method of the main activity. -
+ +Here are four scenarios that describe the possible state of the Google Play services APK on +a user's device:
- To help you, the Google Play services client library has utility methods to assist in - determining whether or not the Google Play services APK is recent enough to support the - version of the client library that you are using. If not, the client library sends users to the - Google Play Store to download a recent version of the Google Play services APK. + To help you, the Google Play services client library has utility methods to + determine whether or not the Google Play services APK is recent enough to support the + version of the client library you are using. If not, the client library sends users to the + Google Play Store to download the recent version of the Google Play services APK.
@@ -121,22 +109,27 @@ page.title=Setup