From 768dba6d8cd6ad56fb6d4e7e30b3260e0d5e0ffd Mon Sep 17 00:00:00 2001 From: Quddus Chong Date: Sat, 8 Dec 2012 17:06:30 -0800 Subject: docs: Merged commits for final release of IABv3 docs. Change-Id: Ib7c26052bb1b4de9a44d78817d7012839eaa953a --- docs/html/training/in-app-billing/index.jd | 46 +++++++ .../training/in-app-billing/list-iab-products.jd | 91 +++++++++++++ .../training/in-app-billing/preparing-iab-app.jd | 144 +++++++++++++++++++++ .../in-app-billing/purchase-iab-products.jd | 138 ++++++++++++++++++++ docs/html/training/in-app-billing/test-iab-app.jd | 56 ++++++++ 5 files changed, 475 insertions(+) create mode 100644 docs/html/training/in-app-billing/index.jd create mode 100644 docs/html/training/in-app-billing/list-iab-products.jd create mode 100644 docs/html/training/in-app-billing/preparing-iab-app.jd create mode 100644 docs/html/training/in-app-billing/purchase-iab-products.jd create mode 100644 docs/html/training/in-app-billing/test-iab-app.jd (limited to 'docs/html/training/in-app-billing') diff --git a/docs/html/training/in-app-billing/index.jd b/docs/html/training/in-app-billing/index.jd new file mode 100644 index 0000000..3d07481 --- /dev/null +++ b/docs/html/training/in-app-billing/index.jd @@ -0,0 +1,46 @@ +page.title=Selling In-app Products + +trainingnavtop=true +startpage=true +next.title=Preparing Your In-app Billing Application +next.link=preparing-iab-app.html + +@jd:body + +
+
+ + +

Dependencies and prerequisites

+
    +
  • Android 2.2 or higher
  • +
+ +

You Should Also Read

+ + +
+
+

In this class, you'll learn how to perform common In-app Billing operations from Android applications.

+

In-app billing is a service hosted on Google Play that lets you charge for digital content or for upgrades in your app. The In-app Billing API makes it easy for you to integrate In-app Billing into your applications. You can request product details from Google Play, issue orders for in-app products, and quickly retrieve ownership information based on users' purchase history. You can also query the Google Play service for details about in-app products, such as local pricing and availability. Google Play provides a checkout interface that makes user interactions with the In-app Billing service seamless, and provides a more intuitive experience to your users.

+

This class describes how to get started with the Version 3 API. To learn how to use the version 2 API, see Implementing In-App Billing (V2).

+ +

Lessons

+ + + +
+
Preparing Your In-app Billing Application
+
In this lesson, you will learn how to prepare your application to use the In-app Billing API and communicate with Google Play. You will also learn how to establish a connection to communicate with Google Play and verify that the In-app Billing API version that you are using is supported.
+
Establishing In-app Billing Products for Sale
+
In this lesson, you will learn how to specify the In-app Billing products for your app in Google Play and query the product details.
+
Purchase In-app Billing Products
+
In this lesson, you will learn how to purchase In-app Billing products, track consumption of purchased items, and query for details of purchased items.
+
Testing Your In-app Billing Application
+
In this lesson, you will learn how to test your application to ensure that In-app Billing is functioning correctly.
+
diff --git a/docs/html/training/in-app-billing/list-iab-products.jd b/docs/html/training/in-app-billing/list-iab-products.jd new file mode 100644 index 0000000..36ff34a --- /dev/null +++ b/docs/html/training/in-app-billing/list-iab-products.jd @@ -0,0 +1,91 @@ +page.title=Establishing In-app Billing Products for Sale +parent.title=Selling In-app Products +parent.link=index.html + +trainingnavtop=true +previous.title=Preparing Your In-app Billing Application +previous.link=preparing-iab-app.html +next.title=Purchasing In-app Billing Products +next.link=purchase-iab-products.html + +@jd:body + +
+
+ +

This lesson teaches you to

+
    +
  1. Specify In-app Products in Google Play
  2. +
  3. Query In-app Product Details
  4. +
+ +

You should also read

+ + + +
+
+ +

Before publishing your In-app Billing application, you'll need to define the product list of digital goods available for purchase in the Google Play Developer Console.

+ +

Specify In-app Products in Google Play

+

From the Developer Console, you can define product information for in-app products and associate the product list with your application.

+ +

To add new in-app products to your product list:

+
    +
  1. Build a signed APK file for your In-app Billing application. To learn how to build and sign your APK, see Building Your Application for Release. Make sure that you are using your final (not debug) certificate and private key to sign your application. +
  2. +
  3. In the Developer Console, open the application entry that you created earlier.
  4. +
  5. Click on the APK tab then click on Upload new APK. Upload the signed APK file to the Developer Console. Don’t publish the app yet!
  6. +
  7. Navigate to the uploaded app listing, and click on In-app Products. +
  8. Click on the option to add a new product, then complete the form to specify the product information such as the item’s unique product ID (also called its SKU), description, price, and country availability. Note down the product ID since you might need this information to query purchase details in your application later.

    Important: The In-app Billing Version 3 service only supports managed in-app products, so make sure that you specify that the purchase type is 'Managed' when you add new items to your product list in the Developer Console.

  9. +
  10. Once you have completed the form, activate the product so that your application can purchase it.

    Warning: It may take up to 2-3 hours after uploading the APK for Google Play to recognize your updated APK version. If you try to test your application before your uploaded APK is recognized by Google Play, your application will receive a ‘purchase cancelled’ response with an error message “This version of the application is not enabled for In-app Billing.”

  11. +
+ +

Query Items Available for Purchase

+

You can query Google Play to programmatically retrieve details of the in-app products that are associated with your application (such as the product’s price, title, description, and type). This is useful, for example, when you want to display a listing of unowned items that are still available for purchase to users.

+

Note: When making the query, you will need to specify the product IDs for the products explicitly. You can manually find the product IDs from the Developer Console by opening the In-app Products tab for your application. The product IDs are listed under the column labeled Name/ID.

+

To retrieve the product details, call {@code queryInventoryAsync(boolean, List, QueryInventoryFinishedListener)} on your IabHelper instance. +

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

+

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.

+ +
+List additionalSkuList = new List();
+additionalSkuList.add(SKU_APPLE);
+additionalSkuList.add(SKU_BANANA);
+mHelper.queryInventoryAsync(true, additionalSkuList,
+   mQueryFinishedListener);
+
+ +

If the query is successful, the query results are stored in an {@code Inventory} object that is passed back to the listener.

+

The following code shows how you can retrieve the item prices from the result set.

+ +
+IabHelper.QueryInventoryFinishedListener 
+   mQueryFinishedListener = new IabHelper.QueryInventoryFinishedListener() {
+   public void onQueryInventoryFinished(IabResult result, Inventory inventory)   
+   {
+      if (result.isFailure()) {
+         // handle error
+         return;
+       }
+
+       String applePrice =
+          inventory.getSkuDetails(SKU_APPLE).getPrice();
+       String bananaPrice =
+          inventory.getSkuDetails(SKU_BANANA).getPrice();
+
+       // update the UI 
+   }
+}
+
+ diff --git a/docs/html/training/in-app-billing/preparing-iab-app.jd b/docs/html/training/in-app-billing/preparing-iab-app.jd new file mode 100644 index 0000000..ab33ccc --- /dev/null +++ b/docs/html/training/in-app-billing/preparing-iab-app.jd @@ -0,0 +1,144 @@ +page.title=Preparing Your In-app Billing Application +parent.title=Selling In-app Products +parent.link=index.html + +trainingnavtop=true +next.title=Establishing In-app Billing Products for Sale +next.link=list-iab-products.html + +@jd:body + + +
+ +
+ +

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.

+ +

Download the Sample Application

+

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.

+

To download the sample application:

+
    +
  1. Open the Android SDK Manager.
  2. +
  3. In the SDK Manager, expand the {@code Extras} section.
  4. +
  5. Select Google Play Billing Library. Make sure to select the download for In-app Billing Version 3 or above.
  6. +
  7. Click Install to complete the download.
  8. +
+

The sample files will be installed to {@code /your/sdk/location/extras/google/play_billing/in-app-billing-v03}.

+ +

Add Your Application to the Developer Console

+

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.

+

To add your application to the Developer Console:

+
    +
  1. Go to the Google Play Developer Console site and log in. You will need to register for a new developer account, if you have not registered previously. To sell in-app items, you also need to have a Google Checkout Merchant account.
  2. +
  3. Click on Try the new design to access the preview version of the Developer Console, if you are not already logged on to that version.
  4. +
  5. In the All Applications tab, add a new application entry. +
      +
    1. Click Add new application.
    2. +
    3. Enter a name for your new In-app Billing application.
    4. +
    5. Click Prepare Store Listing.
    6. +
    +
  6. +
  7. In the Services & APIs tab, find and make a note of the public license key that Google Play generated for your application. This is a Base64 string that you will need to include in your application code later.
  8. +
+

Your application should now appear in the list of applications in Developer Console.

+ +

Add the In-app Billing Library

+

To use the In-app Billing Version 3 features, you must add the {@code IInAppBillingService.aidl} file to your Android project. This Android Interface Definition Language (AIDL) file defines the interface to the Google Play service.

+

You can find the {@code IInAppBillingService.aidl} file in the provided sample app. Depending on whether you are creating a new application or modifying an existing application, follow the instructions below to add the In-app Billing Library to your project.

+

New Project

+

To add the In-app Billing Version 3 library to your new In-app Billing project:

+
    +
  1. Copy the {@code TrivialDrive} sample files into your Android project.
  2. +
  3. Modify the package name in the files you copied to use the package name for your project. In Eclipse, you can use this shortcut: right-click the package name, then select Refactor > Rename.
  4. +
  5. Open the {@code AndroidManifest.xml} file and update the package attribute value to use the package name for your project.
  6. +
  7. Fix import statements as needed so that your project compiles correctly. In Eclipse, you can use this shortcut: press Ctrl+Shift+O in each file showing errors.
  8. +
  9. Modify the sample to create your own application. Remember to copy the Base64 public license key for your application from the Developer Console over to your {@code MainActivity.java}.
  10. +
+ +

Existing Project

+

To add the In-app Billing Version 3 library to your existing In-app Billing project:

+
    +
  1. Copy the {@code IInAppBillingService.aidl} file to your Android project. +
      +
    • If you are using Eclipse: Import the {@code IInAppBillingService.aidl} file into your {@code /src} directory.
    • +
    • If you are developing in a non-Eclipse environment: Create the following directory {@code /src/com/android/vending/billing} and copy the {@code IInAppBillingService.aidl} file into this directory.
    • +
    +
  2. +
  3. Build your application. You should see a generated file named {@code IInAppBillingService.java} in the {@code /gen} directory of your project.
  4. +
  5. Add the helper classes from the {@code /util} directory of the {@code TrivialDrive} sample to your project. Remember to change the package name declarations in those files accordingly so that your project compiles correctly.
  6. +
+ +

Your project should now contain the In-app Billing Version 3 library.

+ +

Set the Billing Permission

+

Your app needs to have permission to communicate request and response messages to the Google Play’s billing service. To give your app the necessary permission, add this line in your {@code AndroidManifest.xml} manifest file:

+
+<uses-permission android:name="com.android.vending.BILLING" />
+
+ +

Initiate a Connection with Google Play

+

You must bind your Activity to Google Play’s In-app Billing service to send In-app Billing requests to Google Play from your application. The convenience classes provided in the sample handles the binding to the In-app Billing service, so you don’t have to manage the network connection directly.

+

To set up synchronous communication with Google Play, create an {@code IabHelper} instance in your activity's {@code onCreate} method. In the constructor, pass in the {@code Context} for the activity, along with a string containing the public license key that was generated earlier by the Google Play Developer Console.

+

Security Recommendation: It is highly recommended that you do not hard-code the exact public license key string value as provided by Google Play. Instead, you can construct the whole public license key string at runtime from substrings, or retrieve it from an encrypted store, before passing it to the constructor. This approach makes it more difficult for malicious third-parties to modify the public license key string in your APK file.

+ +
+IabHelper mHelper;
+
+@Override
+public void onCreate(Bundle savedInstanceState) {
+   // ...
+   String base64EncodedPublicKey;
+   
+   // compute your public key and store it in base64EncodedPublicKey
+   mHelper = new IabHelper(this, base64EncodedPublicKey);
+}
+
+ +

Next, perform the service binding by calling the {@code startSetup} method on the {@code IabHelper} instance that you created. Pass the method an {@code OnIabSetupFinishedListener} instance, which is called once the {@code IabHelper} completes the asynchronous setup operation. As part of the setup process, the {@code IabHelper} also checks if the In-app Billing Version 3 API is supported by Google Play. If the API version is not supported, or if an error occured while establishing the service binding, the listener is notified and passed an {@code IabResult} object with the error message.

+ +
+mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
+   public void onIabSetupFinished(IabResult result) {
+      if (!result.isSuccess()) {
+         // Oh noes, there was a problem.
+         Log.d(TAG, "Problem setting up In-app Billing: " + result);
+      }            
+         // Hooray, IAB is fully set up!  
+   }
+});
+
+ +

If the setup completed successfully, you can now use the {@code mHelper} reference to communicate with the Google Play service. When your application is launched, it is a good practice to query Google Play to find out what in-app items are owned by a user. This is covered further in the Query Purchased Items section.

+ +

Important: Remember to unbind from the In-app Billing service when you are done with your activity. If you don’t unbind, the open service connection could cause your device’s performance to degrade. To unbind and free your system resources, call the {@code IabHelper}'s {@code dispose} method when your {@code Activity} gets destroyed.

+ +
+@Override
+public void 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 new file mode 100644 index 0000000..d5f6634 --- /dev/null +++ b/docs/html/training/in-app-billing/purchase-iab-products.jd @@ -0,0 +1,138 @@ +page.title=Purchasing In-app Billing Products +parent.title=Selling In-app Products +parent.link=index.html + +trainingnavtop=true +previous.title=Establishing In-app Billing Products for Sale +previous.link=list-iab-products.html +next.title=Testing Your In-app Billing Application +next.link=test-iab-app.html + +@jd:body + +
+
+ +

This lesson teaches you to

+
    +
  1. Purchase an Item
  2. +
  3. Query Purchased Items
  4. +
  5. Consume a Purchase
  6. +
+ +

You should also read

+ +
+
+ +

Once your application is connected to Google Play, you can initiate purchase requests for in-app products. Google Play provides a checkout interface for users to enter their payment method, so your application does not need to handle payment transactions directly.

+

When an item is purchased, Google Play recognizes that the user has ownership of that item and prevents the user from purchasing another item with the same product ID until it is consumed. You can control how the item is consumed in your application, and notify Google Play to make the item available for purchase again.

+

You can also query Google Play to quickly retrieve the list of purchases that were made by the user. This is useful, for example, when you want to restore the user's purchases when your user launches your app.

+ +

Purchase an Item

+ +

To start a purchase request from your app, call {@code launchPurchaseFlow(Activity, String, int, OnIabPurchaseFinishedListener, String)} on your {@code IabHelper} instance. You must make this call from the main thread of your {@code Activity}. Here’s an explaination of the {@code launchPurchaseFlow} method parameters:

+ +

The following example shows how you can make a purchase request for a product with ID {@code SKU_GAS}, using an arbitrary value of 10001 for the request code, and an encoded developer payload string.

+ +
+mHelper.launchPurchaseFlow(this, SKU_GAS, 10001,   
+   mPurchaseFinishedListener, "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ");
+
+ +

If the purchase order is successful, the response data from Google Play is stored in an {@code Purchase} object that is passed back to the listener.

+ +

The following example shows how you can handle the purchase response in the listener, depending on whether the purchase order was completed successfully, and whether the user purchased gas or a premium upgrade. In this example, gas is an in-app product that can be purchased multiple times, so you should consume the purchase to allow the user to buy it again. To learn how to consume purchases, see the Consuming Products section. The premium upgrade is a one-time purchase so you don’t need to consume it. It is good practice to update the UI immediately so that your users can see their newly purchased items.

+ +
+IabHelper.OnIabPurchaseFinishedListener mPurchaseFinishedListener 
+   = new IabHelper.OnIabPurchaseFinishedListener() {
+   public void onIabPurchaseFinished(IabResult result, Purchase purchase) 
+   {
+      if (result.isFailure()) {
+         Log.d(TAG, "Error purchasing: " + result);
+         return;
+      }      
+      else if (purchase.getSku().equals(SKU_GAS)) {
+         // consume the gas and update the UI
+      }
+      else (purchase.getSku().equals(SKU_PREMIUM)) {
+         // give user access to premium content and update the UI
+      }
+   }
+};
+
+ +

Security Recommendation: When you receive the purchase response from Google Play, make sure to check the returned data signature, the {@code orderId}, and the {@code developerPayload} string in the {@code Purchase} object to make sure that you are getting the expected values. You should verify that the {@code orderId} is a unique value that you have not previously processed, and the {@code developerPayload} string matches the token that you sent previously with the purchase request. As a further security precaution, you should perform the verification on your own secure server.

+ +

Query Purchased Items

+

Upon a successful purchase, the user’s purchase data is cached locally by Google Play’s In-app Billing service. It is good practice to frequently query the In-app Billing service for the user’s purchases, for example whenever the app starts up or resumes, so that the user’s current in-app product ownership information is always reflected in your app.

+ +

To retrieve the user’s purchases from your app, call {@code queryInventoryAsync(QueryInventoryFinishedListener)} on your {@code IabHelper} instance. The {@code QueryInventoryFinishedListener} argument specifies a listener that is notified when the query operation has completed and handles the query response. It is safe to make this call fom your main thread.

+ +
+mHelper.queryInventoryAsync(mGotInventoryListener);
+
+ +

If the query is successful, the query results are stored in an {@code Inventory} object that is passed back to the listener. The In-app Billing service returns only the purchases made by the user account that is currently logged in to the device.

+ +
+IabHelper.QueryInventoryFinishedListener mGotInventoryListener 
+   = new IabHelper.QueryInventoryFinishedListener() {
+   public void onQueryInventoryFinished(IabResult result,
+      Inventory inventory) {
+
+      if (result.isFailure()) {
+        // handle error here
+      }
+      else {
+        // does the user have the premium upgrade?
+        mIsPremium = inventory.hasPurchase(SKU_PREMIUM);        
+        // update UI accordingly
+      }
+   }
+};
+
+ +

Consume a Purchase

+

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

+

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.

+

Security Recommendation: 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.

+

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.

+

In this example, you want to consume the gas item that the user has previously purchased in your app.

+ +
+mHelper.consumeAsync(inventory.getPurchase(SKU_GAS), 
+   mConsumeFinishedListener);
+
+ +

The following example shows how to implement the {@code OnConsumeFinishedListener}.

+ +
+IabHelper.OnConsumeFinishedListener mConsumeFinishedListener =
+   new IabHelper.OnConsumeFinishedListener() {
+   public void onConsumeFinished(Purchase purchase, IabResult result) {
+      if (result.isSuccess()) {
+         // provision the in-app purchase to the user
+         // (for example, credit 50 gold coins to player's character)
+      }
+      else {
+         // handle error
+      }
+   }
+};
+
+ +

Check for Consumable Items on Startup

+

It’s important to check for consumable items when the user starts up your application. Typically, you would first query the In-app Billing service for the items purchased by the user (via {@code queryInventoryAsync}), then get the consumable {@code Purchase} objects from the Inventory. If your application detects that are any consumable items that are owned by the user, you should send a consumption request to Google Play immediately and provision the item to the user. See the {@code TrivialDrive} sample for an example of how to implement this checking at startup.

+ + diff --git a/docs/html/training/in-app-billing/test-iab-app.jd b/docs/html/training/in-app-billing/test-iab-app.jd new file mode 100644 index 0000000..376b981 --- /dev/null +++ b/docs/html/training/in-app-billing/test-iab-app.jd @@ -0,0 +1,56 @@ +page.title=Testing Your In-app Billing Application +parent.title=Selling In-app Products +parent.link=index.html + +trainingnavtop=true +previous.title=Purchasing In-app Billing Products +previous.link=purchase-iab-products.html + +@jd:body + +
+
+ +

This lesson teaches you to

+
    +
  1. Test with Static Responses
  2. +
  3. Test with Your Own Product IDs
  4. +
+ +

You should also read

+ + +
+
+ +

To ensure that In-app Billing is functioning correctly in your application, you should test the test the application before you publish it on Google Play. Early testing also helps to ensure that the user flow for purchasing in-app items is not confusing or slow, and that users can see their newly purchased items in a timely way.

+ +

Test with Static Responses

+Test your In-app Billing application with static responses by using Google Play’s reserved product IDs.By using reserved product IDs instead of actual product IDs, you can test the purchase flow without specifying an actual payment method or transferring money. To learn more about the reserved product IDs, see Testing In-app Billing. + +

Test with Your Own Product IDs

+

Because Google Play does not allow you to use your developer account to directly purchase in-app products that you have created yourself, you'll need to create test acccounts under your developer account profile. To create a test account, simply enter a valid Google email address. Users with these test accounts will then be able to make in-app-billing purchases from uploaded, unpublished applications that you manage.

+

To test your In-app Billing Version 3 application using your own product IDs: +

    +
  1. In the Developer Console, add one or more tester accounts to the developer account that you are using to publish your application. +
      +
    1. Login to the Developer Console with your developer account.
    2. +
    3. Click Settings > Account details, then in the License Testing section, add the Google email addresses for your tester accounts.
    4. +
    +
  2. Build a signed APK file for your In-app Billing application. To learn how to build and sign your APK, see Building Your Application for Release. Make sure that you are using your final (not debug) certificate and private key to sign your application. +
  3. +
  4. Make sure that you have uploaded the signed APK for your application to the Developer Console, and associated one or more in-app products with your application. You don't need to publish the application on Google Play to test it.

    Warning: It may take up to 2-3 hours after uploading the APK for Google Play to recognize your updated APK version. If you try to test your application before your uploaded APK is recognized by Google Play, your application will receive a ‘purchase cancelled’ response with an error message “This version of the application is not enabled for In-app Billing.”

  5. +
  6. Install the APK file to your physical test device by using the {@code adb} tool. To learn how to install the application, see Running on a Device. Make sure that: +
      +
    • Your test device is running on Android SDK Version 2.2 (API level 8) or higher, and is installed with Google Play client Version 3.9.16 or higher.
    • +
    • The {@code android:versionCode} and {@code android:versionName} attributes values in the {@code AndroidManifest.xml} of the application that you are installing matches the values of your APK in the Developer Console.
    • +
    • Your application is signed with the same certificate that you used for the APK that you uploaded to the Developer Console, before installing it on your device.
    • +
    +
  7. +
  8. Login to the test device by using a tester account. Test your In-app Billing application by purchasing a few items, and fix any issues that you encounter. Remember to refund the purchases if you don’t want your testers to be actually charged!
  9. +
+

+ -- cgit v1.1