How to Implement Google AdMob in your Android App

 


AdMob is a multi-platform mobile advertising network that allows you to integrate ads into your app. By implementing AdMob, you can start earning your extra income. It is very helpful particularly when you are launching a free app and you want to earn some income from it.

Integrating AdMob into your app it's an easy task. In this blog, we’ll build a simple app of two screens to display the different types of ads that Support by AdMob.

1. Type of AdMob Ads

Currently, in AdMob, we have the below types of ad units. You can choose any ad unit based on your app functionality.

➞ Banner Ad

Banner Ads fill only a part of the screen depending on the ad size that is created by you. Banner Ad comes up in multiple sizes Standard, Medium, Large, Full-Size, Leaderboard, and Smart Banner. Smart banners are very useful when you target different screen sizes and fit the same ad depending on the device's screen size.

➞ Interstitial Ad

Interstitial ads occupy the full screen of your mobile. Basically, they will be shown based on time duration, between screen transition or when the user is done some task or process. Usually, we can see these ads in games after your level completion.

➞ Rewarded Video Ad

Rewarded Video Ads are fullscreen video ads that offer some rewards points if the user watches the full ad video. Mostly these ads are used for providing rewards/coins in games.

➞ Native Ad

Native Ads provides the flexibility to set the ad appearance like color, text color, and buttons to fill like a native component of the app.

2. Creating Ad Units

1. Sign in to your AdMob account.

2. Create a new App by adding the package name of your app you want to implement AdMob. Once the App is created, you can find the APP ID on the dashboard of Admob.

3. Select the newly created App and press the ADD AD UNIT button to generate a new ad unit ID.

4. Choose your ad format and give the ad unit a name.

5. Once the ad unit is created, you can notice the Ad unit ID on the AdMob dashboard. It look like ca-app-pub-066XXXXXXX/XXXXXXXXXXX

You can create many ad units as per requirement.

3. Creating New Project on Android Studio

1. Create a Fresh project in Android Studio from File - New Project. You can select Empty Activity from the Prompt, and go next.

2. Add below dependency in build.gradle file required for AdMob integration.

Continue Reading: admob integration

Comments

Popular posts from this blog

Why React Native is the Way Forward for Startups?

An Introduction to Creating Games and NFT Art with Unreal Engine

xCode 13 new features