diff --git a/docs/html/guide/google/gcm/adv.jd b/docs/html/google/gcm/adv.jd similarity index 100% rename from docs/html/guide/google/gcm/adv.jd rename to docs/html/google/gcm/adv.jd diff --git a/docs/html/guide/google/gcm/c2dm.jd b/docs/html/google/gcm/c2dm.jd similarity index 100% rename from docs/html/guide/google/gcm/c2dm.jd rename to docs/html/google/gcm/c2dm.jd diff --git a/docs/html/guide/google/gcm/client-javadoc/allclasses-frame.html b/docs/html/google/gcm/client-javadoc/allclasses-frame.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/allclasses-frame.html rename to docs/html/google/gcm/client-javadoc/allclasses-frame.html diff --git a/docs/html/guide/google/gcm/client-javadoc/allclasses-noframe.html b/docs/html/google/gcm/client-javadoc/allclasses-noframe.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/allclasses-noframe.html rename to docs/html/google/gcm/client-javadoc/allclasses-noframe.html diff --git a/docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/GCMBaseIntentService.html b/docs/html/google/gcm/client-javadoc/com/google/android/gcm/GCMBaseIntentService.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/GCMBaseIntentService.html rename to docs/html/google/gcm/client-javadoc/com/google/android/gcm/GCMBaseIntentService.html diff --git a/docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/GCMBroadcastReceiver.html b/docs/html/google/gcm/client-javadoc/com/google/android/gcm/GCMBroadcastReceiver.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/GCMBroadcastReceiver.html rename to docs/html/google/gcm/client-javadoc/com/google/android/gcm/GCMBroadcastReceiver.html diff --git a/docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/GCMConstants.html b/docs/html/google/gcm/client-javadoc/com/google/android/gcm/GCMConstants.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/GCMConstants.html rename to docs/html/google/gcm/client-javadoc/com/google/android/gcm/GCMConstants.html diff --git a/docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/GCMRegistrar.html b/docs/html/google/gcm/client-javadoc/com/google/android/gcm/GCMRegistrar.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/GCMRegistrar.html rename to docs/html/google/gcm/client-javadoc/com/google/android/gcm/GCMRegistrar.html diff --git a/docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/package-frame.html b/docs/html/google/gcm/client-javadoc/com/google/android/gcm/package-frame.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/package-frame.html rename to docs/html/google/gcm/client-javadoc/com/google/android/gcm/package-frame.html diff --git a/docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/package-summary.html b/docs/html/google/gcm/client-javadoc/com/google/android/gcm/package-summary.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/package-summary.html rename to docs/html/google/gcm/client-javadoc/com/google/android/gcm/package-summary.html diff --git a/docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/package-tree.html b/docs/html/google/gcm/client-javadoc/com/google/android/gcm/package-tree.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/com/google/android/gcm/package-tree.html rename to docs/html/google/gcm/client-javadoc/com/google/android/gcm/package-tree.html diff --git a/docs/html/guide/google/gcm/client-javadoc/constant-values.html b/docs/html/google/gcm/client-javadoc/constant-values.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/constant-values.html rename to docs/html/google/gcm/client-javadoc/constant-values.html diff --git a/docs/html/guide/google/gcm/client-javadoc/default.css b/docs/html/google/gcm/client-javadoc/default.css similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/default.css rename to docs/html/google/gcm/client-javadoc/default.css diff --git a/docs/html/guide/google/gcm/client-javadoc/deprecated-list.html b/docs/html/google/gcm/client-javadoc/deprecated-list.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/deprecated-list.html rename to docs/html/google/gcm/client-javadoc/deprecated-list.html diff --git a/docs/html/guide/google/gcm/client-javadoc/help-doc.html b/docs/html/google/gcm/client-javadoc/help-doc.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/help-doc.html rename to docs/html/google/gcm/client-javadoc/help-doc.html diff --git a/docs/html/guide/google/gcm/client-javadoc/index-all.html b/docs/html/google/gcm/client-javadoc/index-all.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/index-all.html rename to docs/html/google/gcm/client-javadoc/index-all.html diff --git a/docs/html/guide/google/gcm/client-javadoc/index.html b/docs/html/google/gcm/client-javadoc/index.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/index.html rename to docs/html/google/gcm/client-javadoc/index.html diff --git a/docs/html/guide/google/gcm/client-javadoc/overview-tree.html b/docs/html/google/gcm/client-javadoc/overview-tree.html similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/overview-tree.html rename to docs/html/google/gcm/client-javadoc/overview-tree.html diff --git a/docs/html/guide/google/gcm/client-javadoc/package-list b/docs/html/google/gcm/client-javadoc/package-list similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/package-list rename to docs/html/google/gcm/client-javadoc/package-list diff --git a/docs/html/guide/google/gcm/client-javadoc/resources/inherit.gif b/docs/html/google/gcm/client-javadoc/resources/inherit.gif similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/resources/inherit.gif rename to docs/html/google/gcm/client-javadoc/resources/inherit.gif diff --git a/docs/html/guide/google/gcm/client-javadoc/stylesheet.css b/docs/html/google/gcm/client-javadoc/stylesheet.css similarity index 100% rename from docs/html/guide/google/gcm/client-javadoc/stylesheet.css rename to docs/html/google/gcm/client-javadoc/stylesheet.css diff --git a/docs/html/guide/google/gcm/demo.jd b/docs/html/google/gcm/demo.jd similarity index 100% rename from docs/html/guide/google/gcm/demo.jd rename to docs/html/google/gcm/demo.jd diff --git a/docs/html/guide/google/gcm/gcm.jd b/docs/html/google/gcm/gcm.jd similarity index 100% rename from docs/html/guide/google/gcm/gcm.jd rename to docs/html/google/gcm/gcm.jd diff --git a/docs/html/guide/google/gcm/gs.jd b/docs/html/google/gcm/gs.jd similarity index 100% rename from docs/html/guide/google/gcm/gs.jd rename to docs/html/google/gcm/gs.jd diff --git a/docs/html/guide/google/gcm/index.jd b/docs/html/google/gcm/index.jd similarity index 100% rename from docs/html/guide/google/gcm/index.jd rename to docs/html/google/gcm/index.jd diff --git a/docs/html/guide/google/gcm/server-javadoc/allclasses-frame.html b/docs/html/google/gcm/server-javadoc/allclasses-frame.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/allclasses-frame.html rename to docs/html/google/gcm/server-javadoc/allclasses-frame.html diff --git a/docs/html/guide/google/gcm/server-javadoc/allclasses-noframe.html b/docs/html/google/gcm/server-javadoc/allclasses-noframe.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/allclasses-noframe.html rename to docs/html/google/gcm/server-javadoc/allclasses-noframe.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Constants.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/InvalidRequestException.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Message.Builder.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Message.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/MulticastResult.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Result.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Result.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Result.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Result.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Sender.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Sender.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/Sender.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/Sender.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-frame.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/package-frame.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-frame.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/package-frame.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-summary.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/package-summary.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-summary.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/package-summary.html diff --git a/docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-tree.html b/docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/package-tree.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/com/google/android/gcm/server/package-tree.html rename to docs/html/google/gcm/server-javadoc/com/google/android/gcm/server/package-tree.html diff --git a/docs/html/guide/google/gcm/server-javadoc/constant-values.html b/docs/html/google/gcm/server-javadoc/constant-values.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/constant-values.html rename to docs/html/google/gcm/server-javadoc/constant-values.html diff --git a/docs/html/guide/google/gcm/server-javadoc/default.css b/docs/html/google/gcm/server-javadoc/default.css similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/default.css rename to docs/html/google/gcm/server-javadoc/default.css diff --git a/docs/html/guide/google/gcm/server-javadoc/deprecated-list.html b/docs/html/google/gcm/server-javadoc/deprecated-list.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/deprecated-list.html rename to docs/html/google/gcm/server-javadoc/deprecated-list.html diff --git a/docs/html/guide/google/gcm/server-javadoc/help-doc.html b/docs/html/google/gcm/server-javadoc/help-doc.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/help-doc.html rename to docs/html/google/gcm/server-javadoc/help-doc.html diff --git a/docs/html/guide/google/gcm/server-javadoc/index-all.html b/docs/html/google/gcm/server-javadoc/index-all.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/index-all.html rename to docs/html/google/gcm/server-javadoc/index-all.html diff --git a/docs/html/guide/google/gcm/server-javadoc/index.html b/docs/html/google/gcm/server-javadoc/index.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/index.html rename to docs/html/google/gcm/server-javadoc/index.html diff --git a/docs/html/guide/google/gcm/server-javadoc/overview-tree.html b/docs/html/google/gcm/server-javadoc/overview-tree.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/overview-tree.html rename to docs/html/google/gcm/server-javadoc/overview-tree.html diff --git a/docs/html/guide/google/gcm/server-javadoc/package-list b/docs/html/google/gcm/server-javadoc/package-list similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/package-list rename to docs/html/google/gcm/server-javadoc/package-list diff --git a/docs/html/guide/google/gcm/server-javadoc/resources/inherit.gif b/docs/html/google/gcm/server-javadoc/resources/inherit.gif similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/resources/inherit.gif rename to docs/html/google/gcm/server-javadoc/resources/inherit.gif diff --git a/docs/html/guide/google/gcm/server-javadoc/serialized-form.html b/docs/html/google/gcm/server-javadoc/serialized-form.html similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/serialized-form.html rename to docs/html/google/gcm/server-javadoc/serialized-form.html diff --git a/docs/html/guide/google/gcm/server-javadoc/stylesheet.css b/docs/html/google/gcm/server-javadoc/stylesheet.css similarity index 100% rename from docs/html/guide/google/gcm/server-javadoc/stylesheet.css rename to docs/html/google/gcm/server-javadoc/stylesheet.css diff --git a/docs/html/google/google_toc.cs b/docs/html/google/google_toc.cs new file mode 100644 index 0000000000000..d371fa145dc22 --- /dev/null +++ b/docs/html/google/google_toc.cs @@ -0,0 +1,149 @@ + + + + + + diff --git a/docs/html/google/index.jd b/docs/html/google/index.jd new file mode 100644 index 0000000000000..ab2c58ce25bce --- /dev/null +++ b/docs/html/google/index.jd @@ -0,0 +1,86 @@ +page.title=Google Services +@jd:body + +

+ Google offers a variety of services that help you build new revenue streams, enhance your app's + capabilities, manage distribution and payloads, and track usage and installs. + The sections below highlight some of the services offered by Google and link you to more information about + how to use them in your Android app. +

+

+ Integrate Google Products +

+ +

Utilize the most up-to-date features of Google products in your app + without worrying the Android versions running on your users' devices. Users receive updates to Google Play + services through the Google Play store whenever available, ensuring + that exciting, new features of your app reach the most devices possible. + All of this comes with an easy-to-use authentication flow for you and your users. +

Learn more » + +
+   +
+ +

+ Monetize Your App +

+

+ Make the most out of your app's revenue potential by using monetization policies targeted + at your users' needs. +

+ +
+   +
+ +
+
+

+ Google Play In-App Billing +

+

+ Engage users by offering features such as new content or virtual goods directly in your app. +

Learn more » +
+ +
+

+ Google AdMob Ads +

+

+ Generate revenue by displaying ads in your app with multiple ad networks. +

Learn more » +
+
+ + + +

+ Receive Messages from the Cloud +

+ + +

Use Google Cloud Messaging to notify your apps of important events with + that are lightweight and battery-saving. There are no quotas or charges + to use Google Cloud Messaging, no matter how big your messaging needs are.

+ + Learn more » + +
+   +
+ + +

+ Manage App Distribution and Licensing +

+

+ Google Play allows you to manage your app distribution with features such as app licensing + and device filtering. Take advantage of features that let you reach the right users with + the right content while protecting your app from unauthorized use. +

+ + Learn more » + + diff --git a/docs/html/google/play-services/analytics.jd b/docs/html/google/play-services/analytics.jd new file mode 100644 index 0000000000000..df93cbecb3df5 --- /dev/null +++ b/docs/html/google/play-services/analytics.jd @@ -0,0 +1,56 @@ +page.title=Google Analytics +page.landing=true +page.landing.intro=The Google Analytics Platform lets you measure user interactions with your business across various devices and environments. The platform provides all the computing resources to collect, store, process, and report on these user-interactions. +page.landing.link=https://developers.google.com/analytics/devguides/collection/android/v2/ +page.landing.link.text=developers.google.com/analytics +page.landing.image=images/gps-analytics.png + +@jd:body + +
+
+

Key Developer Features

+ + +

Discover user geography and habits

+ Discover where your users are coming from and how they are accessing your app, + from the moment they download your app from the Google Play Store.
+ + +

Track monetization performance

+ Monitor the success of mobile marketing campaigns by taking advantage of the end-to-end visibility + into the performance of your in-app purchases and transactions. +
+ + +

Monitor app usage

+ Record data about the screens your users are viewing in your app and gain insight + on what features they use most. All of this information can help you pinpoint specific + markets and enhance features to make your app the best it can be. +
+ +
+ + +
\ No newline at end of file diff --git a/docs/html/google/play-services/auth.jd b/docs/html/google/play-services/auth.jd new file mode 100644 index 0000000000000..8787ec93ba910 --- /dev/null +++ b/docs/html/google/play-services/auth.jd @@ -0,0 +1,196 @@ +page.title=Authentication +@jd:body + +
+
+

In this document

+
    +
  1. Choosing an account
  2. +
  3. Obtaining an authorization token
  4. +
  5. Handling exceptions
  6. +
  7. Using the token
  8. +
+
+
+ +

+ Google Play services offers a standard authentication flow for all Google APIs and + all components of Google Play services. In addition, you can leverage the authentication + portion of the Google Play services SDK to authenticate to services that are not yet supported + in the Google Play services platform by using the authentication token to manually make API + requests or using a client library provided by the service provider. +

+ +

For implementation details, see the sample in <android-sdk>/extras/google-play-services/samples/auth, which shows you how +to carry out these basic steps for obtaining an authentication token.

+ +

Choosing an Account

+

+ Google Play services leverage existing accounts on an Android-powered device + to authenticate to the services that you want to use. To obtain an authorization token, + a valid Google account is required and it must exist on the device. You can ask your users which + account they want to use by enumerating the Google accounts on the device or using the + built-in +AccountPicker + class to display a standard account picker view. You'll need the + {@link android.Manifest.permission#GET_ACCOUNTS} + permission set in your manifest file for both methods. +

+

+ For example, here's how to gather all of the Google accounts on a device and return them + in an array. When obtaining an authorization token, only the email address of the account is + needed, so that is what the array stores: +

+ +
+private String[] getAccountNames() {
+    mAccountManager = AccountManager.get(this);
+    Account[] accounts = mAccountManager.getAccountsByType(
+            GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);
+    String[] names = new String[accounts.length];
+    for (int i = 0; i < names.length; i++) {
+        names[i] = accounts[i].name;
+    }
+    return names;
+}
+
+

Obtaining an Authorization Token

+

+ With an email address, you can now obtain an authorization token. There are two general + ways to get a token:

+ + + +

Using getToken()

+ The following code snippet obtains an authentication token with an email address, the scope that you want to use for the service, and a {@link android.content.Context}: +
+HelloActivity mActivity;
+String mEmail;
+String mScope;
+String token;
+
+...
+
+try {
+    token = GoogleAuthUtil.getToken(mActivity, mEmail, mScope);
+} catch {
+    ...
+}
+
+ +

Call this method off of the main UI thread since it executes network transactions. An easy way to do this + is in an 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 + are thrown that you can catch and handle appropriately. +

+ +

Using getTokenWithNotification()

+

If you are obtaining authentication tokens in a background service or sync adapter, there are three overloaded getTokenWithNotification() methods + that you can use:

+ + +

See the sample in <android-sdk>/extras/google-play-services/samples/auth for implementation details.

+ +

Handling Exceptions

+

+ When requesting an authentication token with + GoogleAuthUtil.getToken(), + the following exceptions can be thrown: +

+ +

+ For more information on how to handle these exceptions and code snippets, see the reference + documentation for the +GoogleAuthUtil + class. +

+

Using the Token

+

+ Once you have successfully obtained a token, you can use it to access Google services. + Many Google services provide client libraries, so it is recommended that you use these when + possible, but you can make raw HTTP requests as well with the token. The following example + shows you how to do this and handle HTTP error and success responses accordingly: +

+ +
+URL url = new URL("https://www.googleapis.com/oauth2/v1/userinfo?access_token="
+        + token);
+HttpURLConnection con = (HttpURLConnection) url.openConnection();
+int serverCode = con.getResponseCode();
+//successful query
+if (serverCode == 200) {
+    InputStream is = con.getInputStream();
+    String name = getFirstName(readResponse(is));
+    mActivity.show("Hello " + name + "!");
+    is.close();
+    return;
+//bad token, invalidate and get a new one
+} else if (serverCode == 401) {
+    GoogleAuthUtil.invalidateToken(mActivity, token);
+    onError("Server auth error, please try again.", null);
+    Log.e(TAG, "Server auth error: " + readResponse(con.getErrorStream()));
+    return;
+//unknown error, do something else
+} else {
+    Log.e("Server returned the following error code: " + serverCode, null);
+    return;
+}
+
+ +

+ 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(). +

\ No newline at end of file diff --git a/docs/html/google/play-services/dist.jd b/docs/html/google/play-services/dist.jd new file mode 100644 index 0000000000000..85a64f94e3cc8 --- /dev/null +++ b/docs/html/google/play-services/dist.jd @@ -0,0 +1,56 @@ +page.title=Google Play Distribution and Licensing +@jd:body + + +

+ Manage App Distribution and Licensing +

+

+ Google Play allows you to manage your app distribution with features that let you control which users + can download your app as well as deliver separate versions of your app based on certain + characteristics like platform version. +

+
+   +
+
+
+

+ Device Filtering +

+

+ Make sure your app gets to the right users by filtering on a wide range of characteristics + such as platform versions and hardware features. +

Learn more »

+
+ +
+

+ Multiple APK Support +

+

+ Distribute different APKs based on a variety of properties such as platform version, screen + size, and GLES texture compression support. +

Learn more »

+
+ +
+
+

+ APK Expansion files +

+

+ Tap into Google's content delivery services by serving up to 4GB of assets for free. Provide + users with high-fidelity graphics, media files, or other large assets that are required by + your app. +

Learn more » +
+ +
+

+ Application Licensing +

+

Protect your revenue streams and integrate policies for usage into your app. +

Learn more » +
+
\ No newline at end of file diff --git a/docs/html/google/play-services/download.jd b/docs/html/google/play-services/download.jd new file mode 100644 index 0000000000000..fb03035654cce --- /dev/null +++ b/docs/html/google/play-services/download.jd @@ -0,0 +1,140 @@ +page.title=Downloading and Configuring the 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 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. +

+ +

+ To download and configure the Google Play services SDK: +

+ +
    +
  1. + Launch Eclipse and select Window > Android SDK Manager or run android + at the command line. +
  2. +
  3. + Scroll to the bottom of the package list and select Extras > Google Play services. + The add-on is downloaded to your computer and installed in your SDK environment at + <android-sdk-folder>/extras/google/google_play_services/. +
  4. +
  5. + Reference the Google Play services client library project located in + <android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib as + a library project for your Android project. 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. +
  6. +
  7. If you are using ProGuard, add the following + lines in the <project_directory>/proguard-project.txt file: + to prevent ProGuard from stripping away required classes: +
    +-keep class * extends java.util.ListResourceBundle {
    +    protected Object[][] getContents();
    +}
    +
    +
+ +

Ensuring Devices Have the Google Play services APK

+

+ 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: +

+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 + {@link android.app.Activity#onResume onResume()} method of the main activity. + +

+
    +
  1. + A recent version of the Google Play Store app is installed, and the most recent Google Play + services APK has been downloaded. +
  2. +
  3. + A recent version of the Google Play Store app is installed, but the most recent Google Play + services APK has not been downloaded. +
  4. +
  5. + An old version of the Google Play Store app, which does not proactively download Google Play + services updates, is present. +
  6. +
  7. + The Google Play services APK is missing or disabled on the device, which might happen if the + user explicitly uninstalls or disables it. +
  8. +
+

+ Case 1 is the success scenario and is the most common. However, because the other scenarios can + still happen, you must handle them every time your app connects to a Google Play service to + ensure that the Google Play services APK is present, up-to-date, and enabled. +

+

+ 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. +

+ +

+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. + +

+ +

+ It is up to you choose the appropriate place in your app to do the following steps to check for + a valid Google Play services APK. For example, if Google Play services is required for your app, + you might want to do it when your app first launches. On the other hand, if Google Play services + is an optional part of your app, you can do these checks if the user navigates to that portion + of your app: +

+ +
    +
  1. + Query for the status of Google Play services on the device with the +isGooglePlayServicesAvailable() + method, which returns a result code. +
  2. +
  3. + If the result code is +SUCCESS, + then the Google Play services APK is up-to-date, and you can proceed as normal. +
  4. +
  5. + If the result is +SERVICE_MISSING, +SERVICE_VERSION_UPDATE_REQUIRED, + or +SERVICE_DISABLED, + call getErrorDialog() + to display an error message to the user, which will then allow the user to download the APK + from the Google Play Store or enable it in the device's system settings. +
  6. +
\ No newline at end of file diff --git a/docs/html/google/play-services/index.jd b/docs/html/google/play-services/index.jd new file mode 100644 index 0000000000000..60a689d80c9cf --- /dev/null +++ b/docs/html/google/play-services/index.jd @@ -0,0 +1,76 @@ +page.title=Google Maps +page.landing=true +page.landing.intro=Add Google maps to your Android apps and let your users explore the world. Give your users all of the benefits of the Google Maps, but with the customizations that you need for your app and users. +page.landing.link=https://developers.google.com/maps/documentation/android/ +page.landing.link.text=developers.google.com/maps +page.landing.image=images/gps.png + +@jd:body + + +

+ Google Play services is a platform delivered through the Google Play Store that + lets you integrate Google products into your Android apps. + The Google Play services framework consists of a services component + that runs on the device and a thin client library that you package with your app. +

+ + +

+ +OVERVIEW +

+ +
 
+ +
+
+ +

Google Technology

+

Add exciting and useful Google features such as Maps, Google+, Analytics, and more +to your Android apps. Easy-to-use client libraries are provided for the products in Google +Play services, so you can implement the functionality you want faster. New features +and products are continuously being added, so make sure to check back often.

+ +
+
+ +

Standard Authentication

+

All products in Google Play services share a common authentication API + that leverages the existing Google accounts on the device. You and your + users have a consistent and safe way to grant and receive OAuth2 authentication + to Google services. Even services that are not bundled in Google Play services + can take advantage of the authentication APIs as long as they accept OAuth2 + tokens associated with a Google account.

+ +
+
+ +

Automatic Updates

+

Devices running Android 2.2 and newer and that have the Google Play Store app installed +automatically receive updates to Google Play services. New products, features, and fixes are +automatically pushed to a wide range of devices, old and new. You can now enhance your app with the most +up-to-date version of Google Play services without worrying about your users' Android platform version.

+ +
+
+ +

Services

+
+ +

Google+

+

Add social features to your app to with Google+.

+
+ + +

Google Analytics

+

Make sure you're reaching the right users and find ways to reach more with Google Analytics.

+
+ + +

Google Maps

+

Add compelling location-based features to your app to direct your users where they + want to go.

+
+
\ No newline at end of file diff --git a/docs/html/google/play-services/maps.jd b/docs/html/google/play-services/maps.jd new file mode 100644 index 0000000000000..eea17e9bd4060 --- /dev/null +++ b/docs/html/google/play-services/maps.jd @@ -0,0 +1,73 @@ +page.title=Google Maps +page.landing=true +page.landing.intro=Add Google maps to your Android apps and let your users explore the world. Give your users all of the benefits of the Google Maps, but with the customizations that you need for your app and users. +page.landing.link=https://developers.google.com/maps/documentation/android/ +page.landing.link.text=developers.google.com/maps +page.landing.image=images/gps-maps.png + +@jd:body + +
+ + + +
+
\ No newline at end of file diff --git a/docs/html/google/play-services/overview.jd b/docs/html/google/play-services/overview.jd new file mode 100644 index 0000000000000..5ea72d93a79a2 --- /dev/null +++ b/docs/html/google/play-services/overview.jd @@ -0,0 +1,49 @@ +page.title=Overview +@jd:body + +

+Google Play services is a platform delivered by the Google Play Store that offers integration with Google products, +such as Google+, in Android apps. The Google Play services platform consists of a services component that runs on +the device and a thin client library that you package with your app. The following diagram shows the interaction +between the two components: +

+ + + +

+ The Google Play services component is delivered as an APK through the Google Play Store, so + updates to Google Play services are not dependent on carrier or OEM system image updates. Newer + devices will also have Google Play services as part of the device's system image, but updates + are still pushed to these newer devices through the Google Play Store. In general, devices + running Android 2.2 (Froyo) or later that have the Google Play Store receive updates within a + few days. This allows you to leverage the newest APIs for Google products and reach most of the + devices in the Android ecosystem. Devices older than Android 2.2 or devices without the Google + Play Store app are not supported. +

+ +

+ The Google Play services component contains much of the logic to communicate with the specific + Google product that you want to interact with. An easy-to-use authentication flow is also + provided to gain access to supported Google products, which provides consistency for both the + developer and user. From the developer's point of view, requesting credentials is mostly taken + care of by the services component through calls to the client library. From the user's point of + view, authorization is granted with a few simple clicks. +

+ +

+ The client library contains the interfaces to call into the services component. It also contains + APIs that allow you to resolve any issues at runtime such as a missing, disabled, or out-of-date + Google Play services APK. The client library has a light footprint if you use + ProGuard as part of your build process, so it won't have an adverse impact on your app's file size. See the + Downloading and Configuring the Google Play services SDK for more + information on how to configure + ProGuard. +

+ +

+ If you want to access added features or products that are periodically added to the client + library, you can upgrade to a new version as they are released. However, upgrading is not + necessary if you don't care about new features or bug fixes in the new versions of the client + library. We anticipate more Google services to be continuously added, so be on the lookout for + these updates. +

\ No newline at end of file diff --git a/docs/html/google/play-services/plus.jd b/docs/html/google/play-services/plus.jd new file mode 100644 index 0000000000000..77423185a2acc --- /dev/null +++ b/docs/html/google/play-services/plus.jd @@ -0,0 +1,65 @@ +page.title=Google+ +page.landing=true +page.landing.intro=Create an engaging social experience and connect with more users by integrating G+ into your app. +page.landing.link=https://developers.google.com/+/mobile/android/ +page.landing.link.text=developers.google.com/+ +page.landing.image=images/gps-plus.png + +@jd:body + +
+
+

Key Developer Features

+ + +

Share to Google+

+ Display a Share dialog that lets your users share rich content from your app, including text, + photos, URL attachments, and location, into the Google+ stream. +
+ + +

Recommend content

+ Add a native +1 button so users can recommend content from your app. When users +1, they can + also share content with their circles. These endorsements can give your app more + credibility and help it grow faster. +
+ + +

Sign in with Google+

+ Allow users to easily and securely sign in to your app using their Google+ credentials. + This allows you to know who they are on Google+ and to build a more personalized experience in your app. +
+ +

Save moments

+ Save user actions from your app such as check-ins, reviews, video views, comments, and more, + to your users' private Google+ history. From there, users can share these moments with others. +
+
+ + +
\ No newline at end of file diff --git a/docs/html/google/play-services/reference/packages.jd b/docs/html/google/play-services/reference/packages.jd new file mode 100644 index 0000000000000..4f1ce794705d8 --- /dev/null +++ b/docs/html/google/play-services/reference/packages.jd @@ -0,0 +1,6 @@ +page.title=Reference +@jd:body + +

+ See offline docs +

\ No newline at end of file diff --git a/docs/html/guide/google/play/billing/billing_about.html b/docs/html/google/play/billing/billing_about.html similarity index 100% rename from docs/html/guide/google/play/billing/billing_about.html rename to docs/html/google/play/billing/billing_about.html diff --git a/docs/html/guide/google/play/billing/billing_admin.jd b/docs/html/google/play/billing/billing_admin.jd similarity index 100% rename from docs/html/guide/google/play/billing/billing_admin.jd rename to docs/html/google/play/billing/billing_admin.jd diff --git a/docs/html/guide/google/play/billing/billing_best_practices.jd b/docs/html/google/play/billing/billing_best_practices.jd similarity index 100% rename from docs/html/guide/google/play/billing/billing_best_practices.jd rename to docs/html/google/play/billing/billing_best_practices.jd diff --git a/docs/html/guide/google/play/billing/billing_integrate.jd b/docs/html/google/play/billing/billing_integrate.jd similarity index 100% rename from docs/html/guide/google/play/billing/billing_integrate.jd rename to docs/html/google/play/billing/billing_integrate.jd diff --git a/docs/html/guide/google/play/billing/billing_overview.jd b/docs/html/google/play/billing/billing_overview.jd similarity index 100% rename from docs/html/guide/google/play/billing/billing_overview.jd rename to docs/html/google/play/billing/billing_overview.jd diff --git a/docs/html/guide/google/play/billing/billing_reference.jd b/docs/html/google/play/billing/billing_reference.jd similarity index 100% rename from docs/html/guide/google/play/billing/billing_reference.jd rename to docs/html/google/play/billing/billing_reference.jd diff --git a/docs/html/guide/google/play/billing/billing_subscriptions.jd b/docs/html/google/play/billing/billing_subscriptions.jd similarity index 100% rename from docs/html/guide/google/play/billing/billing_subscriptions.jd rename to docs/html/google/play/billing/billing_subscriptions.jd diff --git a/docs/html/guide/google/play/billing/billing_testing.jd b/docs/html/google/play/billing/billing_testing.jd similarity index 100% rename from docs/html/guide/google/play/billing/billing_testing.jd rename to docs/html/google/play/billing/billing_testing.jd diff --git a/docs/html/guide/google/play/billing/index.jd b/docs/html/google/play/billing/index.jd similarity index 100% rename from docs/html/guide/google/play/billing/index.jd rename to docs/html/google/play/billing/index.jd diff --git a/docs/html/google/play/dist.jd b/docs/html/google/play/dist.jd new file mode 100644 index 0000000000000..7e60315334754 --- /dev/null +++ b/docs/html/google/play/dist.jd @@ -0,0 +1,52 @@ +page.title=Google Play Distribution and Licensing +@jd:body + +

+ Google Play allows you to manage your app distribution with features that let you control which users + can download your app as well as deliver separate versions of your app based on certain + characteristics like platform version. +

+
+   +
+
+
+

+ Device Filtering +

+

+ Make sure your app gets to the right users by filtering on a wide range of characteristics + such as platform versions and hardware features. +

Learn more »

+
+ +
+

+ Multiple APK Support +

+

+ Distribute different APKs based on a variety of properties such as platform version, screen + size, and GLES texture compression support. +

Learn more »

+
+ +
+
+

+ APK Expansion files +

+

+ Tap into Google's content delivery services by serving up to 4GB of assets for free. Provide + users with high-fidelity graphics, media files, or other large assets that are required by + your app. +

Learn more » +
+ +
+

+ Application Licensing +

+

Protect your revenue streams and integrate policies for usage into your app. +

Learn more » +
+
\ No newline at end of file diff --git a/docs/html/guide/google/play/expansion-files.jd b/docs/html/google/play/expansion-files.jd similarity index 100% rename from docs/html/guide/google/play/expansion-files.jd rename to docs/html/google/play/expansion-files.jd diff --git a/docs/html/guide/google/play/filters.jd b/docs/html/google/play/filters.jd similarity index 100% rename from docs/html/guide/google/play/filters.jd rename to docs/html/google/play/filters.jd diff --git a/docs/html/guide/google/play/licensing/adding-licensing.jd b/docs/html/google/play/licensing/adding-licensing.jd similarity index 100% rename from docs/html/guide/google/play/licensing/adding-licensing.jd rename to docs/html/google/play/licensing/adding-licensing.jd diff --git a/docs/html/guide/google/play/licensing/index.jd b/docs/html/google/play/licensing/index.jd similarity index 100% rename from docs/html/guide/google/play/licensing/index.jd rename to docs/html/google/play/licensing/index.jd diff --git a/docs/html/guide/google/play/licensing/licensing-reference.jd b/docs/html/google/play/licensing/licensing-reference.jd similarity index 100% rename from docs/html/guide/google/play/licensing/licensing-reference.jd rename to docs/html/google/play/licensing/licensing-reference.jd diff --git a/docs/html/guide/google/play/licensing/overview.jd b/docs/html/google/play/licensing/overview.jd similarity index 100% rename from docs/html/guide/google/play/licensing/overview.jd rename to docs/html/google/play/licensing/overview.jd diff --git a/docs/html/guide/google/play/licensing/setting-up.jd b/docs/html/google/play/licensing/setting-up.jd similarity index 100% rename from docs/html/guide/google/play/licensing/setting-up.jd rename to docs/html/google/play/licensing/setting-up.jd diff --git a/docs/html/guide/google/play/publishing/multiple-apks.jd b/docs/html/google/play/publishing/multiple-apks.jd similarity index 100% rename from docs/html/guide/google/play/publishing/multiple-apks.jd rename to docs/html/google/play/publishing/multiple-apks.jd diff --git a/docs/html/guide/google/play/services.jd b/docs/html/google/play/services.jd similarity index 100% rename from docs/html/guide/google/play/services.jd rename to docs/html/google/play/services.jd diff --git a/docs/html/guide/google/index.jd b/docs/html/guide/google/index.jd deleted file mode 100644 index e1fc5816ef8e0..0000000000000 --- a/docs/html/guide/google/index.jd +++ /dev/null @@ -1,134 +0,0 @@ -page.title=Google Services -footer.hide=1 -@jd:body - -

- Google offers a variety of services that help you build new revenue streams, enhance your app's - capabilities, manage distribution and payloads, and track usage and installs. - The sections below highlight some of the services offered by Google and link you to more information about - how to use them in your Android app. -

-

- Monetize your app -

-

- There are many ways to monetize your Android app, such as with ad impressions or In-App billing. If you - choose to charge a price to download your app, Android also provides the ability to check - for valid application licenses to protect your revenue. Because different apps require - different strategies, you can pick which ones are best for your app. -

-
-   -
-
-
-

- Google AdMob Ads -

-

- Generate revenue by displaying ads in your app with multiple ad networks. -

Learn more » -
-
-

- In-App Billing -

-

- Engage users by offering features such as new content or virtual goods directly in your app. -

Learn more » -
-
-

- Application Licensing -

-

Protect your revenue streams and integrate policies for usage into your a -pp. -

Learn more » -
-
-

- Enhance Your App's Capabilities -

-

- Android and Google technologies work together to provide your users with compelling interactions - with technologies such as Maps and Google+. -

-
-   -
-
-
-

- Google Play Services -

-

- Leverage Google products in your app with an easy to use authentication flow for your users. -

Learn more » -
-
-

- Google Cloud Messaging -

-

- Notify your apps of important events with messages that are lightweight and battery-saving. -

Learn more » -
-
-

- Google Maps -

-

- The Google Maps library for Android brings powerful mapping capabilities to your app. -

Learn more - » -
-
-

- Manage App Distribution -

-

- Google Play allows you to manage your app distribution with features that let you control which users - can download your app as well as deliver separate versions of your app based on certain - characteristics like platform version. -

-
-   -
-
-
-

- Filters on Google Play -

-

- Make sure your app gets to the right users by filtering on a wide range of characteristics - such as platform versions and hardware features. -

Learn more » -
-
-

- Multiple APK Support -

-

- Distribute different APKs based on a variety of properties such as platform version, screen - size, and GLES texture compression support. -

Learn more » -
-
-

- APK Expansion files -

-

- Tap into Google's content delivery services by serving up to 4GB of assets for free. Provide - users with high-fidelity graphics, media files, or other large assets that are required by - your app. -

Learn more » -
-
-

- Track Performance with Analytics -

-

- Google Analytics let you find out how users find your apps and how they use them. Start - integrating analytics to measure your app's success. -

Learn more -» diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs index d875f47fc939a..d7aacbf817e69 100644 --- a/docs/html/guide/guide_toc.cs +++ b/docs/html/guide/guide_toc.cs @@ -533,102 +533,6 @@ - - - - -