27. An Overview of Third-Party In-App Billing APIs for Android

Developers can monetize their Android applications in a variety of ways. In addition to selling applications outright, developers can integrate billing APIs into their applications in order to sell specific content. In this chapter, we discuss some of the in-app billing APIs available to Android developers, how they might be used, and what some of their limitations are.

What Is In-App Billing?

The freemium business model—where apps are published free of charge but contain content for purchase—is perhaps the most popular way to monetize Android applications these days. Users are more likely to sample a free application, and if the content is sufficiently interesting, they are more likely to pay for it.

Developers can implement freemium applications in a variety of ways. For example,

• A role-playing game might provide a shop where users can purchase items. These items might be available for free in the game if the user is willing to play longer, or the user can purchase items if he doesn’t have the time or inclination.

• That same game might want to provide content that is solely available for purchase. For example, perhaps you can customize your character’s appearance only if you have the privilege.

• A platform game might entice users with a couple of free levels or a time limit (three-day trial), and then provide more levels or game play time for purchase thereafter.

• A wallpaper, ringtone, music, or video download application might allow the user to browse and preview content and then purchase only the content he wants.

• A cloud-based music storage application might limit the number of songs that can be stored, unless the user upgrades to a purchased storage plan (unlimited or a tiered setup).

• A photo filter app might enable only certain features, such as the ability to share photos with friends, when the user pays up. That same photo filter app might sell new filters right in the app, as they become available.

• A messaging application might want to enable little extras, such as emoticons or video sending, for users who pay for them.

• A developer might want to provide tiered or priority service to those willing to pay for it. This might mean anything, from “faster” service (usage of a higher-performance server, for example). Maybe a user can buy VOIP support calls that are handled right from the app.

• A developer might want to accept donations from users who like their app. They could even “vote” with their dollars to get more features in the next update to the application.

These are just a few of the many ways that in-app purchases can make the monetization of Android applications that much more achievable. Think creatively.

Using In-App Billing

Android developers have numerous options when it comes to designing freemium applications. Most choose to use one of the several well respected services provided that offer libraries for handling secure in-app purchases. Many in-app billing services work only for applications published by specific providers.

Developers are responsible for managing the content they wish to sell to the user through the billing APIs. In-app billing is nontrivial to implement. There are third-party APIs to use, limitations to consider, security and export concerns, and usually substantial code to write—code that needs to be unique and private to your application to help avoid reverse engineering, piracy, and exploitation of your valuable content.

We discuss several specific in-app billing opportunities for developers in this chapter:

• The Android Market’s in-app billing APIs

• The Amazon Appstore’s in-app billing beta program

• The PayPal billing APIs available from the X.com eCommerce program

All billing APIs have several things in common:

• All in-app billing APIs use a secure connection to complete a financial transaction. This means all billing APIs require the INTERNET permission and a working network connection to function properly.

• All implementations of billing APIs are only as secure as your code is. Protect your digital signatures and any billing API keys provided to you, the developer. Your implementation of billing features should be unique and obfuscated to help avoid piracy and exploitation of your application.

• All in-app billing services that we know of charge commission or fees for use.

• All in-app billing APIs impose addition terms of service and limitations on your applications. We strongly recommend reading the fine print and consulting your financial and law experts if you have questions.

• In-app billing may be tied to a particular device feature, such as having Android Market or Amazon Appstore installed.

• All applications that leverage billing APIs must be careful to comply with international law in terms of taxes, export, and local laws regarding financial transactions.


Image Note

For these reasons, we do not provide sample applications for the in-app billing mechanisms discussed in this chapter, but we have reviewed the sample applications provided with each technology and are confident they are adequate for most developers. If you were hoping for working samples in this book, we have to tell you to completely change them anyway, otherwise they wouldn’t be very secure.


Leveraging Android Market In-App Billing APIs

The Android Market has an in-app billing system that enables you to sell content from within applications. You need an Android Market developer account and Google Checkout/Wallet Merchant account to use these APIs and they have a number of requirements and limitations, such as:

• You can use the APIs only for applications that are published through the Android Market. These can be free or paid applications.

• You can sell digital content using only these APIs. You cannot use them to sell physical goods or services. (This is not an auction payment service, for example.)

• The 30 percent commission fee applies to in-app purchases, just as it does for selling applications on the Android Market.

• You can test your applications before you publish them using test accounts you create with your Android Market publisher account.

• The in-app billing APIs have a number of system requirements you need to comply with. It is available for devices running Android 1.6 (API Level 4) and higher. Other system requirements also exist.

For more information about the Android Market in-app billing APIs, see the Android “Android Market In-app Billing Dev Guide” link in the “References and More Information” section at the end of this chapter.


Image Note

There is an excellent sample application that illustrates how to use the Android Market in-app billing services that is worth looking over. You can find out more about the sample application at http://d.android.com/guide/market/billing/billing_integrate.html#billing-download. It is available for download from the Android SDK Manager under Extras, Google Market Billing package.


Leveraging Amazon Appstore In-App Billing APIs

With the success of Android-powered eBook readers such as the Amazon Kindle Fire, developers are looking to monetize applications published through venues other than the Android Market. Amazon runs its own Android application marketplace in the form of the Amazon Appstore for Android. Amazon is currently running a closed beta program for in-app purchasing. This technology is appropriate for developers publishing on the Amazon Appstore only. If you are interested in joining this program, we recommend signing up here: http://www.amazon.com/gp/html-forms-controller/AmazonAppstore-IAPrequest.


Image Note

At the time of this writing, the Amazon Appstore was available only in the United States.


Leveraging PayPal Billing APIs

PayPal is a popular eCommerce service that facilitates financial transactions between somewhat trusted parties. X.commerce (http://www.x.com) is an eCommerce initiative that combines the eBay technologies such as PayPal services into a suite of products that are accessible via libraries. They publish a set of Mobile Payment Libraries that can be used to integrate PayPal functionality into your Android applications. You can download the libraries at their website (see the direct link in the “References and More Information” section at the end of this chapter). We recommend reading over the Mobile Payment Libraries—Getting Started Guide for Android documentation. The library documentation is available online, as well as developer forums and a test sandbox for development purposes.


Image Note

To publish applications that leverage the Mobile Payments Library, you need to create an X.com developer account and submit your applications for review. You can submit and manage your applications from the X.com website. After your application has been approved, you will receive a key for use with the APIs.


Leveraging Other Billing APIs

There are other billing APIs available for use on the Android platform. If you happen to prefer a specific financial service, see whether they have (or are developing) a mobile API! As always, read the fine print. Third-party libraries, especially those that deal with finances, often have additional terms of use. Also, be aware that you, as the developer, are often responsible for handling taxes and tariffs and other financial law compliance, especially when exporting your application to other countries.

Summary

The Android SDK provides many useful user interface components, which developers can use to create compelling and easy-to-use applications. This chapter introduced you to many of the most useful controls and discussed how each behaves, how to style them, and how to handle events from the user.

References and More Information

Wikipedia discussion on the freemium business model:

http://en.wikipedia.org/wiki/Freemium

Android Market In-app Billing Dev Guide:

http://d.android.com/guide/market/billing/index.html

Amazon Appstore In-app Billing API Closed Beta Program:

http://www.amazon.com/gp/html-forms-controller/AmazonAppstore-IAPrequest

X.commerce Mobile Payment Libraries:

https://www.x.com/developers/paypal/products/mobile-payment-libraries

X.commerce Getting Started Guide for Android:

https://www.x.com/developers/paypal/documentation-tools/quick-start-guides/mobile-payments-library-android/

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.132.213.171