How to create an ADMOB Interstitial Ad in Android Studio | Google Admob Interstitial Ad Network

In this article, we have to create an AdMob interstitial ad format that is used to implement the bottom of the layout or else the top of the layout. So, we have to implement the below code in your project and follow it step by step.

STEP: 01

We can insert dependency in your build.gradle(Module: level) given below.

// Admob Ads Dependency
implementation ''

STEP: 02

Insert Meta-Deta in your “manifests” file given below.

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

STEP: 03

We have to insert INTERNET permission to run this banner ad given below.

<uses-permission android:name="android.permission.INTERNET" />

STEP: 04

we have to create a java code to show ads under the onCreate method in your project given below.

// Interstitial Ad

Now, we have created the main code under AppCompactActivity.

public void loadInterstitialAd() {
AdRequest adRequest = new AdRequest.Builder().build();
InterstitialAd.load(this, "ca-app-pub-3940256099942544/1033173712", adRequest,
new InterstitialAdLoadCallback() {
public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {

Toast.makeText(MainActivity.this, "Ad Loaded", Toast.LENGTH_SHORT).show();;
interstitialAd.setFullScreenContentCallback(new FullScreenContentCallback() {
public void onAdFailedToShowFullScreenContent(@NonNull AdError adError) {
Toast.makeText(MainActivity.this, "Faild to show Ad", Toast.LENGTH_SHORT).show();

public void onAdShowedFullScreenContent() {
Toast.makeText(MainActivity.this, "Ad Shown Successfully", Toast.LENGTH_SHORT).show();

public void onAdDismissedFullScreenContent() {
Toast.makeText(MainActivity.this, "Ad Dismissed / Closed", Toast.LENGTH_SHORT).show();

public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
Toast.makeText(MainActivity.this, "Failed to Load Ad because=" + loadAdError.getMessage(), Toast.LENGTH_SHORT).show();


Scroll to Top