AdMob Ad Incorporated into an Android Activity

A Tutorial on Adding an AdMob Ad to an Android App

Displaying advertisements (ads) is one way of monetizing an App. To monetize (monetise) something is turn turn it into cash. That term applied to Apps and web pages refers to getting revenue through ads or paid content. Showing ads is one way of generating an income from the time and effort spent developing the App. Though a reasonably successful App is required to generate worthwhile funds. Other techniques include charging a price for the App and providing additional content within the App for a fee (In-App Billing).

Google makes it relatively easy to include ads into an App as the simple example code here shows. This tutorial should help those who may have found it difficult to get the example provided with the online AdMob documentation to work. It is assumed that your computer is configured for developing Apps using the Eclipse Integrated Development Environment (IDE) (see Set Up Windows for Android Development if not), and that you can create and run a simple App (see Your First Android Java Program if in doubt). All the steps required to get ad serving in your App working are covered. So read on to find out how to add AdMob to Android Apps.

Get an AdMob Account

You get a very small payment for each ad that is selected (clicked or pressed on) from a device that is running your App. So that Google can make that small payment it must identify in which App the ad was selected. This is done by placing a unique Publisher Id in the code that is showing the ads. To get the unique id for each App you need an AdMob account. Head over to http://www.google.com/ads/admob/ and sign up, you will need a Google account to register.

Target SDK Must be 3.2 or Higher

Your App is ready for publishing, lets put in the ad serving code so that when you activate it on Google Play it can (potentially) make you some money. In this tutorial we will add the code to an existing example project, in this case the code that was written for the article Two Line Lists In Android. You can also follow this tutorial but use your own App to add the code. Continue reading