Wednesday, August 16, 2017

How I added AdMob in my android applications(Banner Ads)


Image Download From google image search


1. First of all I modify build.gradle file. There under dependencies I added a code of line.
 2. Then I added another code of line under res/values/string





3. Then I added AdMob banner code in my activity_main.xml file
Under layout must include      xmlns:ads="http://schemas.android.com/apk/res-auto"


4. Then I added code for this banner in my MainActivity.java file under onCreate method.


5. Finally I added two permission in my AndroidManifest.xml file before Application and also added an activity code for my banner before . also under Application I added a meta-data.










Thats all do. and Run my android application. Now my application is showing my AdMob ads.

For Interstitial Ads Click the link below
http://sagorsarker.blogspot.com/2017/08/interstitial-ads-for-android.html

No comments:

Post a Comment

Recent Post