Admob Banner Ads Android Studio

What is Google Admob ? How to generate Ads for Android apps ! How to monetize your android application using AdMob. AdMob is a mobile ad network from google. In this video i will show you how to place AdMob simple banner ad in your android application.




Step 1



Step 2



Step 3



Step 4





Activity_main.xml Code :

 <com.google.android.gms.ads.AdView
            xmlns:ads="http://schemas.android.com/apk/res-auto"
            android:id="@+id/adView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_alignParentBottom="true"
            ads:adSize="BANNER"
            ads:adUnitId="ca-app-pub-3940256099942544/6300978111">
        </com.google.android.gms.ads.AdView>


Step 5




MainActivity.Java Code :


        AdView mAdView = (AdView) findViewById(R.id.adView);
        AdRequest adRequest = new AdRequest.Builder().build();
        mAdView.loadAd(adRequest);


Thanks for waiting, please subscribe to our YouTube channel.



Download project




Post a Comment

0 Comments