versions.jd revision 768dba6d8cd6ad56fb6d4e7e30b3260e0d5e0ffd
1page.title=In-app Billing Version Notes
2@jd:body
3
4<p>The In-app Billing API is versioned, with each version offering additional features to your app. API support is provided by the Google Play Store app. On most devices, the Google Play Store app is updated automatically to support newer versions of the API. 
5
6<p>The sections below list the supported versions of the In-app Billing API.</p>
7
8<p id="api_check"><strong><em>How to check for In-app Billing version</em></strong></p>
9
10<p>At run time, your app can query the Google Play Store app to determine what version of the API it supports and what features are available. </p>
11
12<ul>
13<li>If you are using in-app  billing version 3, the version information is not directly returned the Google Play. Instead, you can check if Google Play supports the version of the In-app Billing API that you are using by sending a {@code isBillingSupported} request.</li>
14<li>If the In-app Billing API version that you are using is earlier than version 3, the version information is returned in the <code>API_VERSION</code> key of the Bundle object passed in the {@code sendBillingRequest} method. For more information, see <a href="{@docRoot}google/play/billing/v2/billing_reference.html#billing-interface-v2">In-app Billing Service Interface</a>.</li>
15</ul>
16
17<h3 id="version_3">In-app Billing version 3</h3>
18<p><em>December 2012</em></p>
19<ul>
20<li>Requires Google Play client version 3.9.16 or higher.
21<li>Provides a new Android Interface Definition Language (AIDL) file named {@code IInAppBillingService.aidl}. The new interface offers these features:
22<ul>
23<li>Provides a new API to get details of in-app items published for the app including price, type, title and description.</li>
24<li>The purchase flow is synchronous and purchase information is available immediately after it completes.</li>
25<li>Purchase information of in-app purchases is maintained within the Google Play system till the purchase is consumed.</li>
26<li>An API to consume a purchase of an inapp item. All purchases of one-time in-app items are consumable and thereafter can be purchased again.</li>
27<li>An API to get current purchases of the user immediately. This list will not contain any consumed purchases.</li>
28</ul>
29</li>
30<li>Subscriptions are not yet supported in this version of the API.</li>
31</ul>
32
33<h3 id="version_2">In-app Billing version 2</h3>
34<p><em>May 2012</em></p>
35<ul>
36  <li>Adds support for subscriptions, including free trial period.</li>
37  <li>Adds a new supported string value, "2", for the <code>API_VERSION</code> key of the Bundle object passed in the <code>sendBillingRequest()</code>.</li>
38  <li>Adds a new JSON field, <code>purchaseToken</code>, to the <code>orders</code> list returned in a <code>PURCHASE_STATE_CHANGED</code> intent. </li> 
39  <li>Adds a new <code>purchaseState</code> value, <code>3</code> (expired), to the <code>orders</code> list returned in a <code>PURCHASE_STATE_CHANGED</code> intent. The value indicates that a subscription has expired and is no longer valid.</li>
40<li>Requires Google Play (Play Store) version 3.5 or higher.</li>
41</ul>
42
43<h3 id="version_1">In-app Billing version 1</h3>
44<p><em>March 2011</em></p>
45<ul>
46<li>Initial release.</li>
47<li>Requires Google Play/Android Market 2.3.4 or higher.</li>
48</ul>
49
50
51