Android App Development: How to Earn Revenue from Advertising
There was probably a time when you had to jump through hoops before you could display ads inside your Android app. You’d find people who wanted to advertise their goods or services, write code to display their ads, strike up an agreement on the price for your advertising, and so on. Nowadays, it’s not difficult at all. It’s a smooth-running assembly line.
Here, you find the steps you need to take in order to display ads in your app. The details change frequently. So, the outline you find here describes what you can expect to do when you dive into the advertising game. Google’s AdMob facility handles all the nitty-gritty details, and the AdMob web pages guide you through every step of the process.
Here’s the outline:
Sign in with a Google account.
You can use the same account that you use when you sign in to the Play Store’s Developer Console.
Enter the required information about yourself.
Don’t worry. It’s not too much information.
Click a Monetize New App button, or something like that.
When you do, you see a page where you enter the name of your app. AdMob finds your app on the Play Store.
Enter some information about the ads that you want to display.
How do you want the ads to appear? The choices are banner or interstitial.
A banner ad appears as a small band somewhere on the app’s screen.
A banner ad can appear or disappear any time during the run of your app.
An interstitial ad takes up a large part of the device’s screen.
An interstitial ad shows up only when the user won’t be terribly annoyed by the ad’s appearance. For example, if your app is a game, you might code your app so that an interstitial ad appears only between rounds.
If you’re familiar with time/space tradeoffs, you’ll recognize where the two types of ads fit in. A banner ad consumes very little space but can appear almost anytime. An interstitial ad consumes less time in order to gain some space.
In this step, you also specify the refresh rate for ads, and some other things.
The refresh rate is the amount of time that each ad remains on the user’s screen (before being replaced by another ad). Research shows that a rate of 60 seconds or longer works best.
At some point, the web page displays an ad unit ID. This ad unit ID number goes into your app’s code. When a user runs your app, the app sends this ID number to the AdMob servers. The more the AdMob servers receive your ID, the more money you earn.
Make a note of your ad unit ID.
Meanwhile, back on your development computer …
Use the Android SDK Manager to install the Google Repository.
You’ll find the Google Repository entry in the Android SDK Manager’s Extras category.
Add stuff to your project’s files.
Here are a few of the things you do:
You put your ad unit ID in the strings.xml file.
This identifies your app so you can earn money for displaying ads.
You put a com.google.android.gms.ads.AdView element in your activity’s layout.
This element can display ads.
You add code to your app’s activity.
The code loads ads into your layout’s AdView widget. For a banner ad with AdMob, the code is pretty simple:
AdView adView = (AdView) findViewById(R.id.adView); AdRequest = new AdRequest.Builder().build(); adView.loadAd(adRequest);
When your app goes live, the amount that you earn varies from one advertiser to the next. In most cases, the amount hangs on a “cost per something or other” measure. Here are a few possibilities:
CPC: Cost per click
Your payment depends on the number of users who click on the ad in your app.
CPM: Cost per thousand impressions
An impression is the appearance of an ad on a user’s screen. A single impression isn’t very impressive. So for every thousand ads that appear, you get paid.
CPA: Cost per action
You earn money whenever a user performs a certain action. What constitutes an action depends on the advertiser. Examples of actions are clicks, sales, and registrations.
One way or another, advertising is a relatively low-maintenance way to earn some money for publishing your app.