AdMob + iAd

I want to add both AdMob and iAd support into an app.

Here are the issues I am having:

  1. The links provided in the beta test e-mail for the AdMob plug-in do not include documentation on the supported ad sizes. I need to know what to pass in. (e.g. 320x50)

  2. I assume the answer is no, but does the AdMob plug-in support backfilling with iAds (part of the AdMob SDK)?

  3. There is no example on how to use the ads API to support two networks at the same time, even the examples for iAd, Inneractive, and InMobi (the publicly supported networks) are separated out.

What I mean by #3 is that I don’t know whether to do this:

iAds = require(“ads”)

AdMob = require(“ads”)

–initialize both and treat them separately

OR this (I know I’m leaving out params):

ads = require(“ads”)

ads.init(“iads”)

ads.init(“admob”)

OR something else.

I just did this today, and it’s working great.  I only work with full screen ads (interstitial ads), so you still need to work out the details for banner ads (but when I was looking at it, the syntax for banner ads looked just like that of inneractive.)

When I initialize ads, I do this (and I do this only once after the app is launched):

local appID

appID = “com.mycompany.myappname”

ads.init(“iads”, appID, adListener)

appID = “xxxxxxxxxxx” <-- you get this from admob site

ads.init(“admob”, appID, addListener)

When I want to show iads:

ads:setCurrentProvider(“iads”)

ads.show( “interstitial” )

When I want to show admob:

ads:setCurrentProvider(“admob”)

ads.show( “interstitial” )

That’s all there is to it.  I’ve tested it on iPad, and it works great.

I’m sad that admob does not offer full screen ads on iPhone/iPod (much the same way as iads).  So, I still don’t have anything but revmob for iPhone/iPod.  *sigh*  Still, I’m happy admob is working nicely – and without any headache whatsoever in implementing it!

Naomi

Thank you Naomi. 

ads:setCurrentProvider is either undocumented or I can’t find it lol.

Yeah, about ads:setCurrentProvider, I learned of it from iAds thread when it first came out.

Naomi

If you wanna find hidden api’s you can just do 

for key, value in pairs(ads) do print("Key: ", key, "Value: ", value, "Value type: ", type(value)) end&nbsp;

This’ll just cycle through the ads library and look for anything in the ads table. Haven’t tried it with the ads lib specifically but it should work.

Hopefully someone will delete this :slight_smile:

Anybody managed to add Chartboost?

I just did this today, and it’s working great.  I only work with full screen ads (interstitial ads), so you still need to work out the details for banner ads (but when I was looking at it, the syntax for banner ads looked just like that of inneractive.)

When I initialize ads, I do this (and I do this only once after the app is launched):

local appID

appID = “com.mycompany.myappname”

ads.init(“iads”, appID, adListener)

appID = “xxxxxxxxxxx” <-- you get this from admob site

ads.init(“admob”, appID, addListener)

When I want to show iads:

ads:setCurrentProvider(“iads”)

ads.show( “interstitial” )

When I want to show admob:

ads:setCurrentProvider(“admob”)

ads.show( “interstitial” )

That’s all there is to it.  I’ve tested it on iPad, and it works great.

I’m sad that admob does not offer full screen ads on iPhone/iPod (much the same way as iads).  So, I still don’t have anything but revmob for iPhone/iPod.  *sigh*  Still, I’m happy admob is working nicely – and without any headache whatsoever in implementing it!

Naomi

Thank you Naomi. 

ads:setCurrentProvider is either undocumented or I can’t find it lol.

Yeah, about ads:setCurrentProvider, I learned of it from iAds thread when it first came out.

Naomi

If you wanna find hidden api’s you can just do 

for key, value in pairs(ads) do print("Key: ", key, "Value: ", value, "Value type: ", type(value)) end&nbsp;

This’ll just cycle through the ads library and look for anything in the ads table. Haven’t tried it with the ads lib specifically but it should work.

Hopefully someone will delete this :slight_smile:

Anybody managed to add Chartboost?