Watch Video for Better Understanding:



In previous post i explained about how to implement Admob Banner Ad, in this post i will show you how to add Admob Interstitial Ad to your android app.

Note: Please read Admob policy before implementing Admob Interstitial ad. Violating Admob terms may lead to suspension of your Admob account.



  • Open your Project in Android Studio
  • Add below line to your build.gradle in dependencies
compile ''


  • Now open MainActivity,java and add below 2 & 3 lines in public class as shown below


public class MainActivity extends AppCompatActivity {
InterstitialAd mInterstitialAd;
private InterstitialAd interstitial;




  • Now open MainActivity,java and add below lines inside onCreate method
    AdRequest adRequest = new AdRequest.Builder().build();
        // Prepare the Interstitial Ad
        interstitial = new InterstitialAd(MainActivity.this);
// Insert the Ad Unit ID

// Prepare an Interstitial Ad Listener
        interstitial.setAdListener(new AdListener() {
            public void onAdLoaded() {
// Call displayInterstitial() function
  • Now add below method to your
public void displayInterstitial() {
// If Ads are loaded, show Interstitial else show nothing.
if (interstitial.isLoaded()) {;


  • Now open strings.xml from values folder and add below string to it.


<string name="admob_interstitial_id">ca-app-pub-3940256099942544/1033173712</string>



Note: Admob id used in this post for demonstration is a test ad id. Please get your interstitial admob ad id  from Admob 

Click on below link to download source code

[ihc-hide-content ihc_mb_type=”block” ihc_mb_who=”unreg” ihc_mb_template=”1″ ]Download[/ihc-hide-content]