Articles

Affichage des articles du novembre, 2017

How to Implement Admob Interstitial Ad in Android Application

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 compile 'com.google.android.gms:play-services-ads:8.4.0' 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...

How to Implement Admob Banner Ad in Android Application

AdMob is very familiar to all the android developers even for a beginner. AdMob gives you income through revenue generated by displaying Ads on Your App in two ways 1. Displaying Banner Ads & 2. Through Interstitial Ads In this article I will show you how to add Banner Ads in your Android Application assuming that you are using Android Studio for developing your app and your project is kept opened in it. Please watch video for better understanding. Open your project in Android Studio Add below line to your build.gradle dependencies compile 'com.google.android.gms:play-services-ads:8.4.0' Now rebuild the project Build->Rebuild project or click on sync now In project structure, Navigate to activity_main.xml and paste following code in your Layout <com.google.android.gms.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="t...