payment p owerpoint

Post on 14-Apr-2017

151 Views

Category:

Internet

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Advertising: Using Admob

KritiAbhishek

Nick

Registering for ADMOB

Registering with AdMob for Android

-We begin with registration with AdMob, which can be done by using your Gmail account login. This will take you to your Gmail login page, so you must revist the admob.com page by clicking the "Android" icon

-Once you have your app registered, a unit ID will be registered to your app in order to get the ads: this called the Publisher ID

Google API

- Set the target as Google API and add the Admob sdk library/jar

-Right click on the project so that Project>Android>Project Build Target

where the selection for Google API will be made

-Add admob sdk lib in the build path -Clean the project if there are any errors

Specific Instructions for Android

- If you are using Android you no longer require the standalone GoogleAdMobAds

SDK. You can simply import the GooglePlay libraries.

Repository Refrencing and Syncing

-The Google repository should be downloaded through the google SDK manager

- Once downloade, the repository needs to be referenced through the build.gradle file

- By adding - compile 'com.google.android.gms:play-services:6.+' under dependencies

-Sync the project!!!

Edit the Publisher ID in strings.xml

It should be something like this

Ca-app-pub-************************************

In case you missed this while registerating, you can go through the admob.com page and login using your google credentials and it will direct you to your page

Android Manifest

-Set it up so that AdMob has internet and network access in order to display the ad on the application

-The configuration should be added under the current activity. Then permission must be allowed to internet and network:

<uses-permission android:name="com.google.ads.AdActivity"

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

AndroidManifest Permissions

Configuration Change in Android Manifest

-Modify the manifest file to include the permissions version number and the activity definitions

-After this you need to add a unique identifier to allow for the ID to be to be shown within your code in the place you specify

-Every ad banner requires a unique id that can once again be found on your registration page

Modifying activity and AdView

-Modify the activity in which you plan to have the ad showing.

-Start by including xmlns:ads="http://schemas.android.com/apk/res-auto"

-Add an AdView tag at the bottom of the screen you plan to display the ad on

-Once you have set the manifest file and the activity xml file you can modify the java class that it is to be displayed on. Start by declaring a new AdView and then find it by the id you have set. Create an AdRequest call builder().build(); on the request. Then AdViewVariable.loadAd(adRequest);

That's all for Admob. :)))

top related