summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/market/billing/billing_integrate.jd
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/guide/market/billing/billing_integrate.jd')
-rwxr-xr-xdocs/html/guide/market/billing/billing_integrate.jd21
1 files changed, 8 insertions, 13 deletions
diff --git a/docs/html/guide/market/billing/billing_integrate.jd b/docs/html/guide/market/billing/billing_integrate.jd
index d027686..26bda66 100755
--- a/docs/html/guide/market/billing/billing_integrate.jd
+++ b/docs/html/guide/market/billing/billing_integrate.jd
@@ -30,11 +30,7 @@ parent.link=index.html
</div>
</div>
-<div class="special" style="margin-right:345px">
- <p>During the testing phase of the in-app billing release you cannot publish applications that implement in-app billing. You can only upload in-app billing applications as draft applications. For more information, see <a href="{@docRoot}guide/market/billing/billing_about.html">About this Release</a></p>
-</div>
-
-<p>The Android Market in-app billing service provides a straightforward, simple interface for sending in-app billing requests and managing in-app billing transactions using Android Market. This document helps you implement in-app billing by stepping through the primary implementation tasks, using the in-app billing sample application as an example.</p>
+<p>Android Market In-app Billing provides a straightforward, simple interface for sending in-app billing requests and managing in-app billing transactions using Android Market. This document helps you implement in-app billing by stepping through the primary implementation tasks, using the in-app billing sample application as an example.</p>
<p>Before you implement in-app billing in your own application, be sure that you read <a href="{@docRoot}guide/market/billing/billing_overview.html">Overview of In-app Billing</a> and <a href="{@docRoot}guide/market/billing/billing_best_practices.html">Security and Design</a>. These documents provide background information that will make it easier for you to implement in-app billing.</p>
@@ -51,7 +47,7 @@ parent.link=index.html
<h2 id="billing-download">Downloading the Sample Application</h2>
-<p>The in-app billing sample application shows you how to perform several tasks that are common to all in-app billing implementations, including:</p>
+<p>The in-app billing sample application shows you how to perform several tasks that are common to all Android Market in-app billing implementations, including:</p>
<ul>
<li>Sending in-app billing requests to the Android Market application.</li>
@@ -64,8 +60,7 @@ parent.link=index.html
<p>The sample application includes an application file (<code>Dungeons.java</code>), the AIDL file for the <code>MarketBillingService</code> (<code>IMarketBillingService.aidl</code>), and several classes that demonstrate in-app billing messaging. It also includes a class that demonstrates basic security tasks, such as signature verification.</p>
<p>Table 1 lists the source files that are included with the sample application.</p>
-<p class="table-caption" id="source-files-table"><strong>Table 1.</strong>
-In-app billing sample application source files.</p>
+<p class="table-caption" id="source-files-table"><strong>Table 1.</strong> In-app billing sample application source files.</p>
<table>
<tr>
@@ -75,7 +70,7 @@ In-app billing sample application source files.</p>
<tr>
<td>IMarketBillingService.aidl</td>
-<td>Android Interface Definition Library (AIDL) file that defines the IPC interface to the Android Market in-app billing service (<code>MarketBillingService</code>).</td>
+<td>Android Interface Definition Library (AIDL) file that defines the IPC interface to Android Market's in-app billing service (<code>MarketBillingService</code>).</td>
</tr>
<tr>
@@ -142,7 +137,7 @@ In-app billing sample application source files.</p>
<ul>
<li>Configuring and building the sample application.</li>
<li>Uploading the sample application to Android Market.</li>
- <li>Setting up test accounts and running the sample application</li>
+ <li>Setting up test accounts and running the sample application.</li>
</ul>
<p class="note"><strong>Note:</strong> Building and running the sample application is necessary only if you want to see a demonstration of in-app billing. If you do not want to run the sample application, you can skip to the next section, <a href="#billing-add-aidl">Adding the AIDL file to your project</a>.</p>
@@ -221,7 +216,7 @@ In-app billing sample application source files.</p>
<h2 id="billing-add-aidl">Adding the AIDL file to your project</h2>
-<p>The sample application contains an Android Interface Definition Language (AIDL) file, which defines the interface to the Android Market in-app billing service <code>MarketBillingService</code>). When you add this file to your project, the Android build environment creates an interface file (<code>IMarketBillingService.java</code>). You can then use this interface to make billing requests by invoking IPC method calls.</p>
+<p>The sample application contains an Android Interface Definition Language (AIDL) file, which defines the interface to Android Market's in-app billing service (<code>MarketBillingService</code>). When you add this file to your project, the Android build environment creates an interface file (<code>IMarketBillingService.java</code>). You can then use this interface to make billing requests by invoking IPC method calls.</p>
<p>If you are using the ADT plug-in with Eclipse, you can just add this file to your <code>/src</code> directory. Eclipse will automatically generate the interface file when you build your project (which should happen immediately). If you are not using the ADT plug-in, you can put the AIDL file into your project and use the Ant tool to build your project so that the <code>IMarketBillingService.java</code> file gets generated.</p>
@@ -372,7 +367,7 @@ protected Bundle makeRequestBundle(String method) {
<p>The <code>makeRequestBundle()</code> method constructs an initial Bundle, which contains the three keys that are required for all requests: <code>BILLING_REQUEST</code>, <code>API_VERSION</code>, and <code>PACKAGE_NAME</code>. The request returns a synchronous {@link android.os.Bundle} response, which contains only a single key: <code>RESPONSE_CODE</code>. The <code>RESPONSE_CODE</code> key can have the following values:</p>
<ul>
<li><code>RESULT_OK</code>&mdash;in-app billing is supported.</li>
- <li><code>RESULT_BILLING_UNAVAILABLE</code>&mdash;in-app billing is not available because the in-app billing API version you specified is not recognized or the user is not eligible to make in-app purchases (for example, the user resides in a country that prohibits in-app purchases).</li>
+ <li><code>RESULT_BILLING_UNAVAILABLE</code>&mdash;in-app billing is not available because the API version you specified is not recognized or the user is not eligible to make in-app purchases (for example, the user resides in a country that prohibits in-app purchases).</li>
<li><code>RESULT_ERROR</code>&mdash;there was an error connecting with the Android Market application.</li>
<li><code>RESULT_DEVELOPER_ERROR</code>&mdash;the application is trying to make an in-app billing request but the application has not declared the <code>com.android.vending.BILLING</code> permission in its manifest. Can also indicate that an application is not properly signed, or that you sent a malformed request.</li>
</ul>
@@ -633,7 +628,7 @@ public class BillingReceiver extends BroadcastReceiver {
<h2 id="billing-signatures">Verifying Signatures and Nonces</h2>
-<p>The in-app billing service uses two mechanisms to help verify the integrity of the transaction information you receive from Android Market: nonces and signatures. A nonce (number used once) is a cryptographically secure number that your application generates and sends with every <code>GET_PURCHASE_INFORMATION</code> and <code>RESTORE_TRANSACTIONS</code> request. The nonce is returned with the <code>PURCHASE_STATE_CHANGED</code> broadcast intent, enabling you to verify that any given <code>PURCHASE_STATE_CHANGED</code> response corresponds to an actual request that you made. Every <code>PURCHASE_STATE_CHANGED</code> broadcast intent also includes a signed JSON string and a signature, which you can use to verify the integrity of the response.</p>
+<p>Android Market's in-app billing service uses two mechanisms to help verify the integrity of the transaction information you receive from Android Market: nonces and signatures. A nonce (number used once) is a cryptographically secure number that your application generates and sends with every <code>GET_PURCHASE_INFORMATION</code> and <code>RESTORE_TRANSACTIONS</code> request. The nonce is returned with the <code>PURCHASE_STATE_CHANGED</code> broadcast intent, enabling you to verify that any given <code>PURCHASE_STATE_CHANGED</code> response corresponds to an actual request that you made. Every <code>PURCHASE_STATE_CHANGED</code> broadcast intent also includes a signed JSON string and a signature, which you can use to verify the integrity of the response.</p>
<p>Your application must provide a way to generate, manage, and verify nonces. The following sample code shows some simple methods you can use to do this.</p>