Monetizing, Promoting, and Distributing Applications - Professional Android 4 Application Development (2012)

Professional Android 4 Application Development (2012)

Chapter 19. Monetizing, Promoting, and Distributing Applications

What's in this Chapter?

Creating a signing certificate

Signing your applications for distribution

Publishing on Google Play

Monetization strategies

Application promotion strategies

Using Google Analytics

Having created a compelling new Android application, the next step is to share it with the world. In this final chapter you'll learn how to create and use a signing certificate to sign your applications and distribute them.

You'll be introduced to the application launch process and gain some insight into your options for monetizing and promoting your application, and how to ensure you have a successful launch.

You'll also be introduced to Google Play (which expands and replaces the Android Market), learn how to create a developer profile, and how to create your application listing. You'll then be shown how to access the distribution reporting statistics, user comments, and error reports in the Android Developer Console.

After a look at some of the best practices for launch and promotion, you'll learn how to use Google Analytics to gain critical insight into the demographics of your users and how they use your application.

Signing and Publishing Applications

Android applications are distributed as Android package files (.APK). In order to be installed on a device or emulator, Android packages need to be signed.

During development, your applications will be signed using a debug key that is automatically generated by the ADT tools. Before distributing your application beyond your testing environment, you must compile it as a release build and sign it using a private release key—typically using a self-signed certificate.

The JDK includes the Keytool and Jarsigner command-line tools necessary to create a new keystore/signing certificate, and to sign your APK, respectively. Alternatively, you can use the Export Android Application wizard, as described in the next section.


The importance of maintaining the security of your signing certificate can't be overstated. Android uses this certificate as the means of identifying the authenticity of application updates, and applying inter-process security boundaries between installed applications.

Using a stolen key, a third party could sign and distribute applications that maliciously replace your authentic applications.

Similarly, your certificate is the only way you can upgrade your applications. If you lose your certificate, it is impossible to perform a seamless update on a device or from within Google Play. In the latter case, you would need to create a new listing, losing all the reviews, ratings, and comments associated with your previous package, as well as making it impossible to provide updates to the existing users of your application.

Signing Applications Using the Export Android Application Wizard

The Export Android Application wizard simplifies the process of creating and signing a release build of your application package. Once the wizard is complete, your signed package will be ready for distribution.

To launch the wizard, open the Package Explorer and select File Export, open the Android folder, select Export Android Application, and then click Next. Alternatively, select Use the Export Wizard from the manifest GUI, as shown in Figure 19.1. The wizard will prompt you to either select a new keystore or create one, as shown in Figure 19.2.

Figure 19.1


Figure 19.2


To apply an upgrade to an installed application, it must be signed with the same key, so you must always sign an application using the same release key.

The Android guidelines further suggest that you sign all your application packages using the same certificate, as applications signed with the same certificate can be configured to run in the same process, and signature-based permissions can be used to expose functionality between trusted applications signed with the same certificate.

As described earlier, the security of your keystore is extremely important, so be sure to use a strong password to secure it.

After creating or selecting your keystore, you'll be asked to create or select a signing certificate. If you've created a new keystore, you'll need to create a new signing certificate, as shown in Figure 19.3.

Figure 19.3


Applications published on Google Play require a certificate with a validity period ending after October 22, 2033. More generally, your certificate will be used through the lifetime of your application and is necessary to perform upgrades, so you should ensure your signing certificate will outlast your application.

Having selected a signing certificate, the next step is to select an output destination for your package. The wizard will then compile, sign, and zip-align the package.

Your package is now ready for distribution. Before doing anything else, back up your keystore.

Distributing Applications

One of the advantages of Android's open ecosystem is the freedom to publish and distribute your applications however, and wherever, you choose. The most common and popular distribution channel is Google Play; however, you are free to distribute your applications using alternative markets, your own website, social media, or any other distribution channel.

In addition to Google Play, there are several alternatives of varying reach, including OEM and carrier pre-installs, the Amazon App Store, and carrier-specific stores.

When distributing your application, it's important to note that application package names are used as unique identifiers for each application. As a result, each application—including variations that you plan to distribute separately—must each have a unique package name. Note that the filename of your APK does not have to be unique—it will be discarded during the installation process (only the package name is used).

Introducing Google Play

The Google Play Store is the largest and most popular Android application distribution point. At the time of writing this book, it has been reported that there are in excess of 450,000 applications in Google Play, with more than 10 billion application downloads from users in 130 countries—and with a growth rate of more than a billion new downloads each month.

The Google Play Store is a marketplace—that is, Google Play acts as a mechanism for you to sell and distribute your application rather than as a merchant reselling it on your behalf. That means there are far fewer controls restricting what you distribute and how you choose to promote, monetize, and distribute it. Those restrictions are detailed within the Google Play Developer Distribution Agreement (DDA) ( and the Google Play Developer Program Policies (DPP) (

Unlike the Apple App Store and Windows Phone Marketplace, there is no review process for applications before they are listed in Google Play. This applies both to new application listings and updates, allowing you to publish and update your applications at whatever time you choose, without needing to wait for approval.

Applications that are suspected of breaching the DDA or DPP are reviewed, and if found to have breached those agreements and policies, are suspended and the developer notified. In extreme cases of malware, the Google Play Store can remotely uninstall malicious applications from devices.


A lack of a review and approval process does not imply a carte blanche for applications distributed in Google Play. Before publishing your applications, it's important to carefully review the DDA and DPP to ensure your application is compliant. Applications that are in breach of these policies will be suspended, and multiple infringements can result in the suspension or banning of your developer account.

If your application can't be distributed through Google Play, you can still dis-tribute it using an alternative distribution platform.

Google Play provides all the tools and mechanisms required to handle application distribution, updates, sales (domestic and international), and promotion. Once listed, your application will begin to appear in search results and category lists, as well as potentially within promotional categories described later in this chapter.

Getting Started with Google Play

To publish on Google Play, create a developer account at, as shown in Figure 19.4.

Figure 19.4



Your Android Developer Profile will be associated with whichever Google account (if any) you are currently signed in to. It's common that multiple people will need access to this account, particularly if you're distributing applications on behalf of a company.

It's good practice to create a new Google account specifi cally for your Android Developer Profi le.

You will be asked to provide a “Developer Name” —typically your company name—that will be used within Google Play to identify the developer of your applications. Note that it is not a requirement that the developer name used here represents the company or individual who actually wrote the code—it simply identifies the company or individual distributing it.

Completing the registration includes paying a US $25.00 fee and agreeing to the terms of the Android DDA.

Publishing Applications

After creating your Android Developer Profile, you are ready to upload your application. Select the Upload Application button on the Android Developer Console. You'll be prompted to upload your signed release package


The package name (not the file name) must be unique. Google Play uses application package names as unique identifiers and will not allow you to upload a duplicate package name.

After the application is uploaded, you'll be asked to enter your application's assets and listing details, as shown in Figures 19.5 and 19.6.

Figure 19.5


Figure 19.6


It's important that you supply all the assets available—even those that may be listed as optional. Each asset is used throughout Google Play, including the website, Google Play Store clients, and promotional campaigns. Not including some assets may prevent your application from being featured or promoted.

The title, description, and category determine how and where your application will be displayed within Google Play. It's important to provide high quality, descriptive titles and application descriptions in this section to make it easier for users to discover your application and make an informed choice on its suitability.

Do not engage in keyword stuffing or other SEO spam in your title or description, as doing so will likely result in your application being suspended.

It's also possible to supply the title and description in multiple languages.

The listing page also lets you specify the availability of your application, providing mechanisms to set its maturity level and the countries in which you want it to be available.

Finally, you can supply application-specific contact details for users of your applications, as shown in Figure 19.7.

Figure 19.7


These details will be published alongside your application's listing in Google Play, so the email and phone number provided should point to a managed support queue rather than to your personal email address.

When your listing details are complete, click the Publish button. Your application will be live and available for download almost immediately.

Application Reports Within the Developer Console

Once your applications are listed, your publisher page will list each application, along with the number of users and installs, average rating, and total number of ratings, as shown in Figure 19.8.

Figure 19.8


Your publisher page also provides a link to reader comments. Direct feedback from users is invaluable, but such feedback can be unreliable and contradictory. It's good practice to use analytics (as described later in this chapter) to reconcile user comments with statistical analysis.

The Statistics link provides access to a more detailed breakdown of your application's installation statistics, including a graph-based timeline of the application's active installs.

The statistics page also provides some analytical insight into your users, and how they compare to the average for all applications in the same category. This includes the percentage of users running on or in each:

· Platform release

· Hardware device

· Country and language

This information can be extremely useful for deciding where to allocate your resources, which versions of the Android platform you want to support, and in which areas your application is underperforming. For example, you might find that despite Japan being a top 3 country for applications in your category, it doesn't feature in your top 5. This would suggest that a Japanese translation might be a worthwhile investment.

Accessing Application Error Reports

The Android Developer Console provides anonymous error reports and stack traces received from users who experience crashes and freezes while running your application.

When the Android system detects a freeze or crash, users have the option to anonymously upload the error and the associated stack trace. New errors are shown on your applications listing on your publisher site list.

Clicking the Errors link will show you a summary of the errors received, as shown in Figure 19.9, indicating the number of new freezes and crashes, along with rate at which new reports are received each week.

Figure 19.9


You can drill down into new or old freezes/crashes to get further details on each error, as shown in Figure 19.10. Each error is described in terms of the exception at the head of the stack, along with the class that threw it and the number/frequency of reports that match those criteria.

Figure 19.10


Drilling down further into each error will provide access to any user messages submitted along with the error, the distribution of devices on which the errors occurred, and the full stack trace for each error.

These error reports are invaluable for debugging your application in the wild. With hundreds of different Android devices being used in dozens of countries and languages, it's impossible to test every variation. These error reports make it possible for you to determine which edge cases you've missed and rectify them as quickly as possible.

An Introduction to Monetizing Your Applications

As an open ecosystem, Android enables you to monetize your applications using whatever mechanism you choose. If you choose to distribute and monetize your applications using Google Play, three options typically are available:

· Paid applications—Charge users an upfront fee before they download and install your application.

· Free applications with In-App Billing (IAB)—Make the download and installation of the application free, but charge within the application for virtual goods, upgrades, and other value-adds.

· Advertising-supported applications—Distribute the application for free, and monetize it by displaying advertising.

Although paid applications and advertising-supported applications are the traditional mechanisms for monetizing mobile applications, IAB has emerged as an extremely effective alternative. In March 2012, 19 of the top 20 Google Play applications in terms of revenue were free downloads with IAB.

If you choose to charge for your applications on Google Play, either through upfront charges or IAB, the revenue is split between you and Google Play in the form of a transaction fee. At the time of writing this book, that revenue split is set at 70 percent for the developer.

In order to use either approach, you must first create a Google Checkout Merchant Account—you can do this from your Android publisher account. Your application listings will then include the option to set a price for the application and the items sold using IAB (described in Chapter 18).

In each case you are the application distributor and merchant of record, so you are responsible for any legal or taxation obligations associated with the sale of your application, subject to the terms described in the DDA.

You can also monetize your application using in-app advertising. The specific process required to set up advertising within your application will vary depending on the ads provider you choose.

It's beyond the scope of this book to describe the setup process for any particular advertising API; however, the general process could be described as follows:

1. Create a publisher account.

2. Download and install the associated ads SDK.

3. Update your Fragment or Activity layouts to include an add banner.

It's important to ensure that any ads included within your application are as unobtrusive as possible and don't detract significantly from the user experience of your application. It's also important to ensure that your user interaction model doesn't encourage accidental clicks on the ad banner.

In many cases, developers have chosen to offer a paid alternative (either using up-front payment or IAB) to allow users to eliminate ad banners from their applications.

Application Marketing, Promotion, and Distribution Strategies

The first step in effectively marketing and promoting your application is ensuring that you provide the full set of high quality assets for your Google Play listing.

Several promotional opportunities are available within Google Play (described in the next section). However, with more than 450,000 other applications available, it's important that you consider alternative avenues for marketing and promotion rather than simply launching your application.

While your marketing and promotion strategies will vary widely depending on your goals and budget, the following list details some of the most effective techniques to consider:

· Offline cross promotion—If you have a significant offline presence (such as a stores or branches), or a large media presence (such as within newspapers, magazines, or on TV), cross promoting your application through those channels can be a particularly effective way to increase awareness and help to ensure users trust the download. Traditional advertising techniques such as TV and newspaper advertisements can be extremely effective in raising awareness of your application.

· Online cross promotion—If you have a significant web presence, promoting your application through direct links to Google Play can be an effective way to drive downloads. If your application provides a better user experience than your mobile website, you can detect browser visitors from Android devices and direct them to Google Play to download your native app.

· Third-party promotion—Distributing a promotional video on YouTube and leveraging social networks, blogs, press releases, and online review sites can help provide positive word of mouth.

· Online advertising—Online advertising using in-app ad networks (such as AdMob) or traditional search-based advertising (such as Google AdWords) can drive significant impressions and downloads for your application.

Application Launch Strategies

Ratings and reviews can have a significant impact on your application's ranking in category lists and within Google Play search results. As a result, it can be difficult to recover from a poor launch. The following list describes some of the strategies you can use to ensure a successful launch:

· Iterate on features not quality—A poorly implemented but feature-rich application will receive worse reviews than a well-polished application that doesn't do everything. If you are using an agile approach of releasing early and often, ensure each release is of the same high quality, adding new features as part of each release. Similarly, each release should be more polished and stable than the last.

· Create high quality Google Play assets—The first impression your application makes is through its appearance in Google Play. Maximize the likelihood of that impression resulting in an installation by creating assets that represent the quality of your application.

· Be honest and descriptive—Disappointed users who find your application is not as it was described are likely to uninstall it, rate it poorly, and leave negative comments.

Promotion Within Google Play

In addition to the effect of reviews, downloads, and installs will have on your Google Play listing, there are several automated and curated lists that are used by the Google Play editorial team to highlight high quality applications.

Additionally, a small number of applications are chosen as “featured” applications, receiving priority placement in Google Play. Featured applications typically receive a significant boost in download numbers, making featuring highly prized goal.

While the criteria used to determine which applications become featured is not publicly available, there are certain criteria that have generally become associated with featured applications, including:

· High quality and innovative—The featured applications in Google Play act as a showcase for the platform. As a result, the easiest way to be featured is by creating a high quality application that is useful and innovative.

· A high degree of fit-and-finish—The listings for featured applications include all the requisite promotional assets, while the applications themselves have few bugs and a high quality user interface.

· Broad device and platform support—Featured applications typically support a broad range of device types and platform versions, including both handsets and tablets.

· Use of newly released features—Applications that leverage hardware features and software APIs from new Android platform releases offer an opportunity for the Google Play team to highlight those new features to reviewers and early adopters.

· Consistency with the platform user experience—Featured applications provide a compelling user experience that is consistent with the UI and interaction models offered by the Android platform.


At the time of writing, Google Play was available in more than 190 countries. While the exact breakdown varies by application category, in most cases more than 50 percent of application installations are downloaded from countries outside the United States on devices whose language is set to non-English.

Japan and South Korea represent the two largest consumers of applications outside the United States, while on a per capita basis South Korea, Taiwan, and Hong Kong represent the most voracious consumers of Android applications.

Externalizing all your application's string (and where appropriate, image) resources, as described in Chapter 2, makes it easy to localize your applications by providing alternative translated resources.

In addition to the application itself, Google Play provides support for adding local language titles and descriptions for your applications, as shown in Figure 19.11.

Figure 19.11


While non-native speakers may be able to use your applications, there is a very good chance that they'll search and browse Google Play using their native language. To maximize the discoverability of your application, it's good practice to invest in creating translations for at least the title and description of your application.


The process of providing fully localized translations for your application can be expensive and time-consuming, so it's often useful to use the Android Developer Console statistics to prioritize the languages to localize for.

Anecdotally, it has been found by many developers that bad translations are consideredworse than no translation

Analytics and Referral Tracking

Mobile application analytics packages, such as Google Analytics and Flurry, can be effective tools for you to better understand who is using your application and how they are using it. Understanding this information can help you make objective decisions on where to focus your development resources.

While the statistics provided by the Android Developer Console (described earlier in this chapter) offer valuable insight into your users' language, country, and handsets, using detailed analytics can provide a much richer source of information, from which you can discover bugs, prioritize your feature list, and decide where best to allocate your development resources.

Broadly speaking, you can track three types of data within your application:

· User analytics—Understand the geographic locations (and language settings) of your users, as well as the speed of their Internet connections, their screen sizes and resolutions, and the orientation of their displays. Use this information to prioritize your translation efforts and optimize your layout and assets for different screen sizes and resolutions.

· Application usage patterns—The first step in integrating analytics is to record each Activity as you would a web site. This will help you understand the way your application is being used, and will help you to optimize your workflows in the same way you would a web site.

· Taken one step further, you can record any action—which options were changed, which menu items or Action Bar actions were selected, which popup menus were displayed, if a Widget was added, and which buttons were pressed. Using this information, you can determine exactly how your application is being used, allowing you to better understand how well the assumptions you made during design match actual usage.

· When building games, you can use the same process to gain insight into players' progress though the game. You can track how far people progress before quitting, identify levels that are more difficult (or easier) than you expected, and then modify your game accordingly.

· Exception tracking—In addition to printing an error into the log output, post each unique exception thrown using your analytics. Not only does this alert you to which exceptions are being thrown, you will also gain insight into their context. Specifically, you'll be able to see if there are particular devices, locations, or usage patterns that lead to particular exceptions.

While it's important to track as much analytic information as possible, care must be taken when transmitting that data back to the analytics server. Every time a new data connection is created, the wireless radio may be activated—and it will continue to draw power for up to 20 seconds on a typical 3G wireless radio. As a result it's important to bundle the analytics information you collect and queue it for transfer the next time your application transfers data, rather than transmitting it as it's collected.

Using Google Analytics for Mobile Applications

Google provides an SDK for using Google Analytics on mobile devices. You can download the Google Analytics for Mobile Apps SDK from


There are no restrictions on which analytics packages you can use within your Android applications. Although this section describes the process for configuring and using Google Analytics specifically, the same general process is applicable for most alternatives.

After downloading the SDK, you need to copy the libGoogleAnalytics.jar into your application's /lib folder and add it to the project's build path.

The Google Analytics library requires access to the Internet and the network state, so add the INTERNET and ACCESS_NETWORK_STATE permissions to your manifest:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />


The use of Google Analytics is governed by its Terms of Service, available at Also note that you must indicate to your users—either within the application or in your Terms of Service—that you reserve the right to anonymously track and report their activity within your application.

Each application uses a web property ID (a UA number) for tracking within Google Analytics. It's generally good practice to use the Google account used to maintain your Google Play listing to control the related Google Analytics account.

To create a new UA number for your application, create a new web property at, using a dummy web site URL that represents your application. It's good practice to use your reversed package name (for example, Once you've created the new property, note the UA number.

The use of Google Analytics within your application is handled by the GoogleAnalyticsTracker class. You can get an instance of this service using its getInstance method:

GoogleAnalyticsTracker tracker = GoogleAnalyticsTracker.getInstance();

To begin tracking, use the start method, passing in the UA number in the form UA-MY_CODE-[UA Code] (without the brackets) and the current context:

tracker.start("UA-MY_CODE-XX", this);

For every action you want to track, use the trackPageView method, passing in a descriptive text string alias to represent it:


Note that the page names you're tracking are totally arbitrary, letting you create a new page for every action you want to track.

Each update is recorded in a private SQLite database, so to minimize the battery impact of activating the wireless radio to transmit analytics data, it's best practice to batch the updates and dispatch them the next time your application accesses the Internet. To send your updates to the Google Analytics server, use the dispatch method:


Google Analytics also supports tracking events and ecommerce transactions. Further details on their use are available at

Referral Tracking with Google Analytics

It's possible to use Google Analytics for Android to track application installation referrals using the referrer URL parameter in links to Google Play. You can track the source of each installation and associate future actions with it. This is particularly useful for evaluating the effectiveness of a particular marketing technique.

To add referral tracking to your applications, create a new receiver tag in your manifest:

    <action android:name="" />

You can generate a referral link for Google Analytics campaign tracking at