cs286 graduate presentation -...

Post on 14-Oct-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

By Kiruthika Sivaraman

CS286 – GRADUATE PRESENTATION INTEGRATING AD’S INTO ANDROID AND IOS APPLICATIONS

• Introduction

• Setting up AdMob account

• Integration of Ad into Android Application

• Integration of Ad into iOS Application

AGENDA

• Advertisements are necessary for the apps to be free for users

• There are various providers who provide SDKs for integrating Ads into mobile application.

• Some of them are AdMob, AdSense.

INTRODUCTION

• Go to http://www.admob.com/login/

• Login using your Gmail account

• Add your mobile app/site into which you want to integrate Ads

• Enter your payment details before you add a site

• A publisher ID will be provided once the site has been added successfully .

• This ID will be used later while coding.

SETTING UP ADMOB ACCOUNT

SETTING UP ADMOB ACCOUNT

• Setting up the environment

• A demo application

• Sample output

INTEGRATION OF AD INTO ANDROID APPLICATION

• Download the AdMob SDK for Android

• Download it from https://developers.google.com/mobile-ads-sdk/download [or]

• In Eclipse IDE go to Window -> Android SDK Manager -> Extras -> AdMob to install the package

• Create a new Android Application

• Add the AdMob SDK to the build path of the project.

SETTING UP THE ENVIRONMENT

• Add the following to the AndroidManifest.xml

A DEMO APPLICATION

• There are two ways to integrate an Ad into Android application – programmatically or through XML configuration file.

• First we have to create an AdView object and associate it with the publisher ID received while adding the site in AdMob

• Next create a new AdRequest object

• Load the AdView with the AdRequest object.

A DEMO APPLICATION

Programmatic way

A DEMO APPLICATION

XML way

A DEMO APPLICATION

SAMPLE OUTPUT

• Setting up the environment

• A demo application

• Sample output

INTEGRATION OF AD INTO IOS APPLICATION

• Step 1 - Download the AdMob SDK for iOS https://developers.google.com/mobile-ads-sdk/download

• Create a new Single View Application

• Add the downloaded files by right clicking on the project -> Add Files to …

SETTING UP THE ENVIRONMENT

• Step 2 - SDK needs the following frameworks: • StoreKit

• AudioToolbox

• MessageUI

• SystemConfiguration

• CoreGraphics

• AdSupport

• To add these frameworks, double click on the project -> Build Phases -> Link Binary with Libraries -> “+”

• Then add all the above specified frameworks.

• Make sure the target is clicked before adding.

SETTING UP THE ENVIRONMENT

Step 2

SETTING UP THE ENVIRONMENT

• Step 3 – Need to add “-ObjC” to the project build settings.

• Double click on the project -> Build Settings -> Linking -> Other Linker Flags

• Add “-ObjC” to both debug and release

SETTING UP THE ENVIRONMENT

Step 3

SETTING UP THE ENVIRONMENT

• Add the below code to the .h file of your project.

A DEMO APPLICATION

• Add the following code to the viewDidLoad in the .m file.

A DEMO APPLICATION

SAMPLE OUTPUT

Thank You!

top related