Make Money Online BANNERS Android – Eclipse – 03 – Adding Banner Ads in Android App – Admob Monetization

Android – Eclipse – 03 – Adding Banner Ads in Android App – Admob Monetization

Android – Eclipse – 03 – Adding Banner Ads in Android App – Admob Monetization post thumbnail image


Adding Banner Ads in Android App – Admob Monetization

It is no secret that monetization is one of the main reasons why people develop mobile apps. There are many different ways to monetize your app, but one of the most popular and effective methods is through banner ads. In this article, we will show you how to add banner ads in your Android app using Admob.

Before we get started, you will need to create a new Android project in Eclipse. If you are not familiar with Eclipse, you can check out our tutorial on how to get started with Eclipse.

Once you have created your project, the first thing you need to do is to add the Google Play Services library to your project. You can do this by right-clicking on your project and selecting Properties. In the properties window, select Android from the left sidebar and then click on Add in the Library section.

In the resulting dialog, select Google Play Services from the list and click OK.

Now that you have added the library, it is time to add the Admob SDK to your project. You can download the SDK from here. Once you have downloaded it, extract it to a convenient location and then add the admob-android-sdk-.jar file to your project’s libs directory.

Next, we need to add some permissions and activities to our AndroidManifest.xml file:
“`xml


“`

The first two permissions are required by Admob in order for banner ads to work properly. The AdActivity activity is also required and should be declared as shown above. If you are using a different version of AdmobSDK, you may need to use a different activity name (check the release notes for more information).

With that out of the way, we can now start coding! First, let’s create a layout for our main activity that includes a RelativeLayout and an AdView:

“`xml

Related Post