Ad Mob

14
Build a great app business with AdMob •Android application development

description

National Mobile Application Awareness Development & Capacity Building Program (Android Slides)

Transcript of Ad Mob

Page 1: Ad Mob

Build a great app business

with AdMob

• Android application development

Page 2: Ad Mob
Page 3: Ad Mob

figure 1. Showing where you can find your Publisher ID

Page 4: Ad Mob

Requirements

Page 5: Ad Mob

Add and reference the Google Play services library project

Page 6: Ad Mob

Add Meta Data Tag

Page 7: Ad Mob

Declare com.google.android.gms.ads.AdActivity

Page 8: Ad Mob

Set up network permissions

Page 9: Ad Mob

Adding a com.google.android.gms.ads.AdView

Android apps are composed of View objects, which are Java instances the user sees as text areas, buttons and other controls. AdView is simply another View subclass displaying small HTML5 ads that respond to user touch.

Like any View, an AdView may be created either purely in code or largely in XML.

The five lines of code it takes to add a banner:

1. Import com.google.android.gms.ads.*

2. Declare an AdView instance

3. Create it, specifying the ad unit ID

4. Add the view to the UI

5. Load it with an adThe easiest place to do all this is in your app's Activity.

Page 10: Ad Mob
Page 11: Ad Mob

Result

Page 12: Ad Mob

Banner Options

Page 13: Ad Mob

Download an example project

https://google-mobile-dev.googlecode.com/files/BannerExample_Play_1.0.zip

Page 14: Ad Mob

Thank You.