Ad Mob
-
Upload
nationalmobileapps -
Category
Education
-
view
109 -
download
0
description
Transcript of Ad Mob
![Page 1: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/1.jpg)
Build a great app business
with AdMob
• Android application development
![Page 2: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/2.jpg)
![Page 3: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/3.jpg)
figure 1. Showing where you can find your Publisher ID
![Page 4: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/4.jpg)
Requirements
![Page 5: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/5.jpg)
Add and reference the Google Play services library project
![Page 6: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/6.jpg)
Add Meta Data Tag
![Page 7: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/7.jpg)
Declare com.google.android.gms.ads.AdActivity
![Page 8: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/8.jpg)
Set up network permissions
![Page 9: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/9.jpg)
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](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/10.jpg)
![Page 11: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/11.jpg)
Result
![Page 12: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/12.jpg)
Banner Options
![Page 13: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/13.jpg)
Download an example project
https://google-mobile-dev.googlecode.com/files/BannerExample_Play_1.0.zip
![Page 14: Ad Mob](https://reader036.fdocuments.us/reader036/viewer/2022062319/5588f89dd8b42af8678b45d6/html5/thumbnails/14.jpg)
Thank You.