Our Android Application, 100K+ Downloads Download
Close ads ->
Close ads ->
-->

Random Posts

Follow US

Admob Bottom Banner Set Up

Set up admob banner on your android application . Earn money from your application using admob .
Share it:
Admob Bottom Banner Set Up
Set up admob banner on your android application . Earn money from your application using admob .

You can add advertisements in any where and you can add a banner like this . Follow the steps and remember you can add it any where

1. Add this XML codes to your activity_main.xml file and change the Ad Id which is marked in red colour .
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-8786388391413586/8431231748"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true">
</com.google.android.gms.ads.AdView>
Just Replace the Ad Id Which Is Marked In Red Colour . Admob Ad Id could be got from your admob account .

2. Add this Java codes below the onCreate() method . On the corresponding Java activity of the .XML activity here i have selected the default once that is activity_main.xml and the corresponding default java part of it is MainActivity.java . Add there java codes there .
AdView adView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.build();
adView.loadAd(adRequest);
Videos and images will be added soon :) 
Share it:

ANDROID STUDIO

Post A Comment:

0 comments: