diff options
Diffstat (limited to 'docs/html/training/in-app-billing')
4 files changed, 8 insertions, 6 deletions
diff --git a/docs/html/training/in-app-billing/index.jd b/docs/html/training/in-app-billing/index.jd index 3d07481..94708b8 100644 --- a/docs/html/training/in-app-billing/index.jd +++ b/docs/html/training/in-app-billing/index.jd @@ -1,4 +1,5 @@ page.title=Selling In-app Products +page.tags="billing" trainingnavtop=true startpage=true diff --git a/docs/html/training/in-app-billing/list-iab-products.jd b/docs/html/training/in-app-billing/list-iab-products.jd index 36ff34a..c423fc1 100644 --- a/docs/html/training/in-app-billing/list-iab-products.jd +++ b/docs/html/training/in-app-billing/list-iab-products.jd @@ -54,7 +54,7 @@ next.link=purchase-iab-products.html <li>The {@code List} argument consists of one or more product IDs (also called SKUs) for the products that you want to query.</li> <li>Finally, the {@code QueryInventoryFinishedListener} argument specifies a listener is notified when the query operation has completed and handles the query response.</li> </ul> -If you use the the convenience classes provided in the sample, the classes will handle background thread management for In-app Billing requests, so you can safely make queries from the main thread of your application. +If you use the convenience classes provided in the sample, the classes will handle background thread management for In-app Billing requests, so you can safely make queries from the main thread of your application. </p> <p>The following code shows how you can retrieve the details for two products with IDs {@code SKU_APPLE} and {@code SKU_BANANA} that you previously defined in the Developer Console.</p> diff --git a/docs/html/training/in-app-billing/preparing-iab-app.jd b/docs/html/training/in-app-billing/preparing-iab-app.jd index a7b3528..4698cf7 100644 --- a/docs/html/training/in-app-billing/preparing-iab-app.jd +++ b/docs/html/training/in-app-billing/preparing-iab-app.jd @@ -33,15 +33,15 @@ next.link=list-iab-products.html <p>Before you can start using the In-app Billing service, you'll need to add the library that contains the In-app Billing Version 3 API to your Android project. You also need to setting the permissions for your application to communicate with Google Play. In addition, you'll need to establish a connection between your application and Google Play. You should also verify that the In-app Billing API version that you are using in your application is supported by Google Play.</p> <h2 id="GetSample">Download the Sample Application</h2> -<p>In this training class, you will use a reference implementation for the In-app Billing Version 3 API called the {@code TrivialDrive} sample application. The sample includes convenience classes to quickly set up the In-app Billing service, marshal and unmarshal data types, and handle In-app Billing requests from the main thread of your application. </p> +<p>In this training class, you will use a reference implementation for the In-app Billing Version 3 API called the {@code TrivialDrive} sample application. The sample includes convenience classes to quickly set up the In-app Billing service, marshal and unmarshal data types, and handle In-app Billing requests from the main thread of your application.</p> <p>To download the sample application:</p> <ol> <li>Open the <a href="{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>.</li> <li>In the SDK Manager, expand the {@code Extras} section.</li> -<li>Select <strong>Google Play Billing Library</strong>. Make sure to select the download for In-app Billing Version 3 or above.</li> -<li>Click <strong>Install</strong> to complete the download.</li> +<li>Select <strong>Google Play Billing Library</strong>.</li> +<li>Click <strong>Install packages</strong> to complete the download.</li> </ol> -<p>The sample files will be installed to {@code /your/sdk/location/extras/google/play_billing/in-app-billing-v03}.</p> +<p>The sample files will be installed to {@code <sdk>/extras/google/play_billing/}.</p> <h2 id="AddToDevConsole">Add Your Application to the Developer Console</h2> <p>The Google Play Developer Console is where you publish your In-app Billing application and manage the various digital goods that are available for purchase from your application. When you create a new application entry in the Developer Console, it automatically generates a public license key for your application. You will need this key to establish a trusted connection from your application to the Google Play servers. You only need to generate this key once per application, and don’t need to repeat these steps when you update the APK file for your application.</p> @@ -133,6 +133,7 @@ mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { <pre> @Override public void onDestroy() { + super.onDestroy(); if (mHelper != null) mHelper.dispose(); mHelper = null; } diff --git a/docs/html/training/in-app-billing/purchase-iab-products.jd b/docs/html/training/in-app-billing/purchase-iab-products.jd index 7fa77d3..4e6e035 100644 --- a/docs/html/training/in-app-billing/purchase-iab-products.jd +++ b/docs/html/training/in-app-billing/purchase-iab-products.jd @@ -104,7 +104,7 @@ IabHelper.QueryInventoryFinishedListener mGotInventoryListener </pre> <h2 id="Consume">Consume a Purchase</h2> -<p>You can use the In-app Billing Version 3 API to track the ownership of purchased items in Google Play. Once an item is purchased, it is considered to be "owned" and cannot be purchased again from Google Play while in that state. You must send a consumption request for the item before Google Play makes it available for purchase again. All managed in-app products are consumable. How you use the consumption mechanism in your app is up to you. Typically, you would implement consumption for products with temporary benefits that users may want to purchase multiple times (for example, in-game currency or replensihable game tokens). You would typically not want to implement consumption for products that are purchased once and provide a permanent effect (for example, a premium upgrade).</p> +<p>You can use the In-app Billing Version 3 API to track the ownership of purchased items in Google Play. Once an item is purchased, it is considered to be "owned" and cannot be purchased again from Google Play while in that state. You must send a consumption request for the item before Google Play makes it available for purchase again. All managed in-app products are consumable. How you use the consumption mechanism in your app is up to you. Typically, you would implement consumption for products with temporary benefits that users may want to purchase multiple times (for example, in-game currency or replenishable game tokens). You would typically not want to implement consumption for products that are purchased once and provide a permanent effect (for example, a premium upgrade).</p> <p>It's your responsibility to control and track how the in-app product is provisioned to the user. For example, if the user purchased in-game currency, you should update the player's inventory with the amount of currency purchased.</p> <p class="note"><strong>Security Recommendation:</strong> You must send a consumption request before provisioning the benefit of the consumable in-app purchase to the user. Make sure that you have received a successful consumption response from Google Play before you provision the item.</p> <p>To record a purchase consumption, call {@code consumeAsync(Purchase, OnConsumeFinishedListener)} on your {@code IabHelper} instance. The first argument that the method takes is the {@code Purchase} object representing the item to consume. The second argument is a {@code OnConsumeFinishedListener} that is notified when the consumption operation has completed and handles the consumption response from Google Play. It is safe to make this call fom your main thread.</p> |