In-app Billing first launched on Android Market (now Google Play) on March 29, 2011, that let developers publish apps that use In-app Billing and allow users to make purchases from within the apps -- today, received an update making it even more powerful and flexible, making applications simpler to write, debug and maintain with the new improved design.
Now at version 3, the In-app Billing is available to any application that uses in-app items and is supported by Android 2.2+ devices running the latest version of the Google Play store.
Google notes that "support for subscriptions is coming shortly."
To use In-App Billing Version 3, you'll need to use the new Google Play Developer Console preview.
Here are the features of v3 of In-app Billing:
- "Improved design that makes applications simpler to write, debug and maintain.
- Integrations that previously required several hundred lines of code can now be implemented in as few as 50
- More robust architecture resulting in fewer lost transactions
- Local caching for faster API calls.
- Long-anticipated functionality such as the ability to consume managed purchases and query for product information," informs Google.
In-app Billing v3, also comes with improved Licensing and In-app Billing keys. "Keys are now set on a per-app basis, instead of a per-developer basis and are available on the "Services & APIs" page for each application on Google Play Developer Console preview," google wrote. "All existing applications will continue to work with their current keys."
Also, released today is the version 3.0 of the API that now allows developers to make synchronous requests and handle responses directly from within a single Activity, "all of which are accomplished with just a few lines of code," google added. Perviously, the asynchronous structure required four different application components.
Also, "all purchases are now managed by Google Play, which means the ownership of a given item can be queried at any time."
The v3.0 API now leverages "local cache" feature of the Google Play store application and caches In-app Billing information locally on the device, making it readily available to applications. With this feature, "many API calls will be serviced through cache lookups instead of a network connection to Google Play, which significantly speeds up the API's response time," google explains.
The API v3 also introduces the "ability to query in-app product information directly from Google Play." "Developers can now programmatically obtain an item's title, description and price. No currency conversion or formatting is necessary: prices are reported in the user's currency and formatted according to their locale," added Google.
In addition to the API, a new sample application released today "illustrates how to implement In-app Billing." Google notes, that developers who are new to In-app Billing leverage the code in this sample, "as it further simplifies the process of implemention."
The sample application is available for download through the Android SDK Manager.