Giter VIP home page Giter VIP logo

alextouch.googleadmobads's Introduction

AlexTouch.GoogleAdMobAds

This is a MonoTouch Binding for Google's AdMob library Version 6.2.0

You just need to download the project, Open it with MonoDevelop, build project and add the resulting AlexTouch.GoogleAdMobAds.dll to your MonoTouch project (This DLL will be located in /AlexTouch.GoogleAdMobAds/bin/<DEBUG|RELEASE>/AlexTouch.GoogleAdMobAds.dll).

Once referenced in your MonoTouch project add the following using statement to your source file.

		using AlexTouch.GoogleAdMobAds;

Also it uses the c# events =) so Have Fun!!

		var ad = new GADBannerView(GADAdSizeCons.MediumRectangle,new PointF(0,0))
		{
			AdUnitID = "Use Your AdMob Id here",
			RootViewController = this //or your RootViewController	
		};
		
		ad.DidReceiveAd += delegate 
		{
			this.View.AddSubview(ad);
			Console.WriteLine("AD Received");
		};
		
		ad.DidFailToReceiveAdWithError += delegate(object sender, GADBannerViewDidFailWithErrorEventArgs e) {
			Console.WriteLine(e.Error);
		};
		
		ad.WillPresentScreen += delegate {
			Console.WriteLine("showing new screen");
		};
		
		ad.WillLeaveApplication += delegate {
			Console.WriteLine("I will leave application");
		};
		
		ad.WillDismissScreen += delegate {
			Console.WriteLine("Dismissing opened screen");
		};
		
		Console.Write("Requesting Ad");
		ad.LoadRequest(new GADRequest());

Also visit the official documentation of this API

http://code.google.com/mobile/ads/docs/ios/fundamentals.html
http://code.google.com/mobile/ads/docs/ios/intermediate.html
http://code.google.com/mobile/ads/docs/ios/advanced.html

alextouch.googleadmobads's People

Contributors

dalexsoto avatar jlyonsmith avatar

Watchers

Guido Van Hoecke avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.