Watch Video for Better Understanding:

[youtube]https://youtu.be/Sa_SRSJ7iLs[/youtube]

 

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.

 

Procedure

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

 

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

 

 

 

  • Now open MainActivity,java and add below lines inside onCreate method

  • Now add below method to your  MainActivity.java

 

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

 

 

 

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]