How to setup Google AdMob
Spread the love

AdMob is Google’s advertising platform particularly created for mobile apps. By displaying targeted advertisements that meet your defined criteria, AdMob enables you to monetize your apps. So, if you’ve created an Android app and are looking to monetize your app, I’ll show you how to add several ad formats to your apps in this post. 

You put a lot of effort into developing your app. With in-app advertisements, actionable data, and robust, user-friendly tools that help you expand your app business, AdMob makes it simple to generate money. 

AdMob is without a doubt the leader in in-app advertising. This article explains how to use AdMob advertising to make money. 

To prepare your app, complete the steps in the following sections. But first let’s discuss what exactly is AdMob. 


In brief, AdMob can be summed up as an incredible advertisement tool by Google. It is a holy grail for ad developers since it renders a streamlined revenue. It makes sure that the banner space is utilized with proper and appropriate content for the audience to view.  

It is a common practice for app makers to incorporate in-app advertising monetization models. This serves as an ideal revenue source from apps that are free and allow developers to earn revenue. Banner ads placement is strategized in a way, so it does not ruin the user experience. Ads by AdMob are quite responsive, something that attracts more users. 

 Now let’s delve into the steps for setting up AdMob for your app



Make sure to use Android Studio 3.2 or higher 

Additionally, ensure the following variables are utilized in your app’s build file as recommended by Google AdMob:   

  • A minSdkVersion of 19 or higher 
  • A compileSdkVersion of 28 or higher 


Credit: AdMob 

Register your app as an AdMob app by following these steps: 

  • Sign in to or sign up  -> AdMob account. 
  • After getting your app registered with AdMob, this step creates an AdMob app with a unique AdMob App ID that is needed in the later steps. 


1. Open your dashboard after logging into AdMob. Now, click on Apps in the left panel> Add your Application these> Fill out the app details needed by AdMob> Click Add, this will create an AdMob ID for your app. 

Credit: AdMob 

2. Click on Ad units -> ADD AD UNIT 

Credit: AdMob 

3. Include Google’s Maven repository and Maven central repository  in your project-level build.gradle file, in both buildscript and allprojects sections: 

buildscript { 
    repositories { 
allprojects { 
    repositories { 


3. Add the following dependencies to your module’s app-level Gradle file (commonly app/build.gradle): 

dependencies { 

  implementation '' 



4. Add the <meta-data>tag to your AndroidManifest.xml file to include your AdMob Application ID. 



        <!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 --> 







Use your actual AdMob app ID rather than the one shown above in a real app. Use the example app ID displayed above if you merely want to test the SDK in a Hello World app. 


Your app should initialize the Google Mobile Ads SDK before loading ads by calling MobileAds.initialize(), which initializes the SDK and calls back a completion listener upon completion (or after a 30-second timeout). This should only be done once, ideally upon app launch. 

1. Add the Google Mobile Ads SDK dependency to the build.gradle module file and initialize it. 

implementation ‘’ 

2. Prior to broadcasting any type of announcement from one of your activities, the Mobile Ads SDK must be initialized. This method should be called only once and as soon as possible, ideally when the application is launched. 

class MainActivity : AppCompatActivity() { 

    override fun onCreate(savedInstanceState: Bundle?) { 



        MobileAds.initialize(this, "YOUR_ADMOB_APP_ID") 




Wait until the finish handler is called before loading advertising if you’re using mediation, as this will guarantee that all mediation adapters are initialised. 


The AdMob App ID is necessary to initialize MobileAds SDK in our app for ads to be loaded. Calling MobileAds.Initialize() with our AdMob App ID is the first step.  

Here’s an example of calling initialize() in an activity. 

package com.tutlane.admobexample; 
import android.os.Bundle; 
public class MainActivity extends AppCompatActivity { 
    protected void onCreate(Bundle savedInstanceState) { 
        // Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 
        MobileAds.initialize(this, "ca-app-pub-3214000786576152~8215460912"); 


After successfully importing the Mobile Ads SDK, we are now prepared to integrate advertisements into our application. 


The Google Mobile Ads SDK is now imported, and you’re prepared to run an advertisement. You may select the ad type that best suits the user experience of your app from the variety of options offered by AdMob (banner, interstitial, and rewarded). 

Let’s discuss about the different AdMob ad formats. 

1. Banner Ads 

These are the AdMob Ads in a rectangle that show up at the top or bottom of the device screen. While users are engaged with the app, banner AdMob ads remain on the screen and have the option to automatically refresh. They’re a good place to start if you’re new to mobile advertising. 

The most popular format for mobile banner AdMob advertising is owing to its ease of use and potential for higher CPMs with strategic placement. Mobile ad banners are often shown in static ad units that are positioned at the top or bottom of the device’s screen. 

Although mobile banner AdMob ads size might vary, the most common sizes for smartphones are 320×480, 300×250 and 320×50. 

Some fascinating insights on mobile banner advertising made by InMobi: On Android, lifestyle content has the greatest banner ad conversion (2.02%); on iOS, classified content has the highest banner ad conversion (2.7%). 

When is it a good idea to use this form of advertising? Mobile banner advertisements can be a smart investment if you want to raise your brand’s visibility among people who are your prospective customers at a reasonable price. 


  • accessible across all screens 
  • inexpensively offered 
  • Quick and simple deployment 
  • does not diminish the user’s experience  

2. Interstitial Ads 

AdMob Advertisements that cover the entire interface of an app until the user closes them. Ideally, they should be used when there is a natural pause in an app’s flow, such as between levels in a game or just after tasks are completed. 

Mobile interstitial advertising is a full-screen, interactive ad that appears during transitional times such as when opening or exiting an app, changing levels in a game, stopping, or trying to alter an app’s sections. 

The most often used sizes of interstitials ads are 320*480 and 480*320 for smartphones. 

As compared to banner AdMob ads, interstitial AdMob ads format has 2-3x higher CTR , which means a better result. 

In terms of use cases, interstitial AdMob advertising is the most alluring format for brand marketers across almost all industries. 

In terms of use cases, interstitial AdMob advertising is the most alluring format for brand marketers across almost all industries. 


  • More ad space for a broader message 
  • Visually appealing and unforgettable 
  • High CTR and impressions 
  • Interactive 

Native Ads 

AdMob Ads that may be customised to fit the style and feel of your app. The layout is more in line with the style of your app as you determine how and where they should be positioned. 

The adverts might be shown as an icon, a feed, or in-stream content to provide a fantastic user experience and seem seamless. When each format should be used, they are as follows: 

  • News apps and entertainment apps with multi-tile layouts can easily display icon ads  
  • The combination of feed ads and user-generated content works well in a chat list.  
  • Mobile advertising campaigns in social networking apps can benefit from rich in-stream ads that mimic the app’s content feed. 

Ads of this kind will display contextually relevant content, such as a cosmetics advertisement in the middle of an article on a beauty site. Native advertising is extremely successful thanks to its seamless placement, which produces an outstanding CTR. 

Using native advertising offers a special chance to tell your brand’s narrative. The combination of an image, a headline, and a description enables advertisers to communicate their message succinctly and persuasively while also providing further details about the features, principles, and background of the product or service. 


  • Contextually relevant and unobtrusive 
  • Higher CTR 
  • Better ad engagement rate 
  • Advanced user experience 

Rewarded Ads 

AdMob advertisements that provide visitors rewards for watching short films and taking part in playable commercials and surveys. It is used monetize to free-to-play applications. 

Videos that emerge smoothly before, during, or after the video serve as an example of this style. For smartphones, it should be 320×480 or 480×320 sizes. 

When the user taps to play, a conventional video ad plays for 15 or 30 seconds. Video commercials have developed to include both horizontal and vertical alternatives as vertical video filming have grown in popularity (mostly for social media). 

Placement of mobile video advertising correctly helps increase audience engagement levels. It is best practise to put it at a natural break in the user’s app experience. Additionally, while introducing a video to consumers, advertising should employ creativity since a captivating preview screen motivates viewers to watch the full video. It’s usual practise to deliver Autoplay video with muted sound and allow users to toggle it on and off in order to reduce the danger of annoying viewers. 


  • Users rate video ads positively. 
  • Attention-grabbing 
  • Ideal for advertisers 

Also, read about How To Make Money With Your Free App? 


It is simple to monetize your app with the swing2app AdMob plugin! 

Swing2App is the one-stop solution for folks who want to create apps. It is a perfect app creator website that offers a wide range of services in addition to producing mobile apps for Android and iOS. 

Utilizing Swing2App offers several benefits, one of which is the availability of plug-in products with AdMob integration. After that, you may add AdMob ads to the app. 

If you have an AdMob account, all you have to do is include the required Swing2App details, and the AdMob ads are added automatically to your app. All of the advertising revenue is distributed to the users via Swing2App. Swing2App only charges the installation price in order to include AdMob in the app. 

Google created the amazing advertising solution AdMob to deliver optimised earnings. It makes sure the banner space is used effectively and contains relevant material the viewers would find interesting. 

For app developers, using in-app advertising revenue techniques is a common practise. This serves as a fantastic source of income from free programmes that provide developers the opportunity to make money. In order to avoid degrading the user interface, banner placement is strategically planned. 

The amount of money you can make with this AdMob integration plug-in may now be on your mind. 

As much as we would like to provide a more accurate estimate using AdMob for the value you may obtain from in-app advertisements, such an answer is already available. As was already said, the success and reputation of your app determines how much money you will get from these adverts. So, if you want to profit greatly from the in-app monetization approach using AdMob, make sure that your app does well in terms of user growth. 

Tutorial for AdMob integration in your app 


Now that you know how to set up your Google AdMob account, we believe you are well prepared. Additionally, we have outlined the differences between different ad formats, and which one should be used based on your requirements.   

Furthermore, the Swing2App no-code platform makes it easy to create and publish apps, as well as use the AdMob app integration for easy monetization. 

Leave a Reply