Admob Integration

Forum for posting sample code and examples, new posts creation is not allowed, but everybody can comment

Admob Integration

Postby sunny » Sun Sep 20, 2009 8:46 pm

This is complete startup project with js APIs for controlling admob adds integrated on obj-c level
Attachments
admob_sample.zip
works with NK 1.9.2+
(804.5 KiB) Downloaded 35 times
User avatar
sunny
Staff
 
Posts: 1786
Joined: Sat May 30, 2009 5:18 am
Location: kiev, Ukraine

Re: Admob Integration

Postby dsmurl » Mon Sep 21, 2009 5:27 am

How do I get the Iphone SDK without signing up for their stuff? Do you have any examples of the objective c/js mix without having to sign up for more stuff from other companies?

- Sam
dsmurl
 
Posts: 5
Joined: Sun Sep 13, 2009 5:16 am

Re: Admob Integration

Postby BBMedia » Mon Sep 21, 2009 5:43 am

dsmurl wrote:How do I get the Iphone SDK without signing up for their stuff? Do you have any examples of the objective c/js mix without having to sign up for more stuff from other companies?

- Sam


Sam, in order to get the iPhone SDK you must be an Apple iPhone Developer - http://developer.apple.com/iphone/program/
It costs only $99 for an individual to apply to become a developer.
BBMedia
 
Posts: 5
Joined: Wed Sep 16, 2009 8:32 pm

Re: Admob Integration

Postby dsmurl » Mon Sep 21, 2009 5:48 am

Sorry about that. I'm specifically referring to the admob iphone sdk. I just need an example of how to use the objective cjs mix thing. Is there documentation on this? The numblekit documentation is a barebones api list and is not helpful. Are there better docs for numble kit? Are there better tutorials somewhere because the tutorials seem to be lacking also. I just don't understand why someone would include the a third party registration(and prompt for money) inside a tutorial about a subject that completely unmentioned in the nimblekit documentation. Let me know if i'm comletely confused here.

- Sam
dsmurl
 
Posts: 5
Joined: Sun Sep 13, 2009 5:16 am

Re: Admob Integration

Postby sunny » Mon Sep 21, 2009 8:16 am

documentation on obj-c/js mix not yet available, however on this post viewtopic.php?f=6&t=408
you can find most full info about obj-c/js mix (not in first comment, read the whole post)
Also NimbleKit, iPhone SDK and Admob can be downloaded completely free and tested on simulator completely free too. Admob sample code here only because NimbleKit users needed it. The contents of this post will be moved to NimbleKit wiki (http://www.nimblekit.com/wiki) in How To's section
User avatar
sunny
Staff
 
Posts: 1786
Joined: Sat May 30, 2009 5:18 am
Location: kiev, Ukraine

Re: Admob Integration

Postby mattchapman » Tue Sep 29, 2009 4:59 am

ok,

I got the test to show up at the bottom after the link is shown... how do you get the admob stuff to show up when the html is loaded and then refresh later? So no onClick. Can you do an onLoad?
mattchapman
NimbleKit Expert
 
Posts: 77
Joined: Tue Jul 07, 2009 11:24 pm

Re: Admob Integration

Postby mattchapman » Tue Sep 29, 2009 5:01 am

I did a <body onLoad="showAdmob()";> and that worked.... how do I set the refresh rate of it though?
mattchapman
NimbleKit Expert
 
Posts: 77
Joined: Tue Jul 07, 2009 11:24 pm

Re: Admob Integration

Postby sunny » Tue Sep 29, 2009 12:00 pm

you can call setTimeout and then recall it within called function, this way you will have timer which calls function every specified interval.
see http://www.elated.com/articles/javascri ... tinterval/
User avatar
sunny
Staff
 
Posts: 1786
Joined: Sat May 30, 2009 5:18 am
Location: kiev, Ukraine

Re: Admob Integration

Postby billymay » Tue Sep 29, 2009 1:57 pm

I call mine like this:

Code: Select all
<script>
function updateAdvert()
{
   CallNKitAction("nextAd?className=AdmobController");
    setTimeout("updateAdvert()", 20000);
}
</script>
<script type="text/javascript">
NKRegisterClass("AdmobController");
{
   CallNKitAction("showAdmob?className=AdmobController");
   setTimeout("updateAdvert()", 20000);
}
</script>


Basically, it calls the ad then 20 seconds later it calls the function updateAdvert which refreshes the ad, then it repeats after another 20 seconds.

Billy
billymay
 
Posts: 73
Joined: Mon Aug 24, 2009 9:23 pm

Re: Admob Integration

Postby billymay » Sat Oct 03, 2009 4:09 am

Hey guys,

Admob seems to doing quite well for me, but sometimes an ad doesn't load, whether you don't have a data connection or maybe you are out and about with an iPod Touch. I would like to have a look an "ad" that loads only if an admob ad doesn't load... any ideas? I assume you'd use:

Code: Select all
- (void)didFailToReceiveAd:(AdMobView *)adView;


Any help would be awesome!

Billy
billymay
 
Posts: 73
Joined: Mon Aug 24, 2009 9:23 pm

Next

Return to Sample Code

Who is online

Users browsing this forum: No registered users and 1 guest