ADMOB, integrate both banner and interstitual issue

Thank you for this improvement but this still does not solve the problem of recognizing in the listener what triggered the event (the banner or the interstitial).

This is essential for implementing a fall-back strategy.

Could you further enhance it so we get a new property in the event table, identifying the source (banner or interstitial) ?

@ubj3d.android are you trying to show both at the same time?  if you know you’re requesting one or the other set a flag:

lastAdType = “banner”

Then in your listener look to see what your last request was for.  That should work.

Rob, I am showing both.

Why to close the banner every time showing the interstitial?

Because the interstitial is supposed to be the only thing on the screen.  It’s for “in-between” things.  I would hide the banner, show the interstitial, then show the banner again when ready. 

If you show the interstitial (without hiding the banner), the banner is not visible, that is OK.

That way you don’t have to “worry” about showing and hiding the banner.

In your approach, how would I know the interstitial is closed (I think there is no event for that) to show the banner?

ok, it isn’t really cool to reply to myself, but i fixed this. my bad, i forgot the “appId=” part inside the ads.show(“banner”), that’s why it didn’t showed up. so, i can confirm that everything works fine. but still i have another small request: can you make a way to preload admob ads? because the interstitial takes some time to show up.

anyway, thank you for this fix

Hi Rob,

There is also one big problem, that I’m surprised that so far nobody encountered it.

In Landscape mode right half of the banner ad is not clickable, so in case of Admob you can’t open ad because Download button is on right side.

I opened ticket for this issue 20 days ago (Case 26618), but nobody answered it. I can not upload my game because of this issue. Can you please take a look at it? 

Example code is attached to case.

Thank you

Hey,

Is this still an issue for anybody else? The show() link above does not work, but when I added it to my show() by doing this:

ads.show( adType, { x=adX, y=adY, testMode=false, appId=appId[adType] } )

it worked once, but failed to after that. 

I’m using 2014.2155.

Jyrki

Any update on the status of this?  Seems like it still isn’t possible to show both ads with admob.

Looks like the show() appID functionality was removed.

no no, it’s still working fine. just do what the moderator guy said

AppID doesn’t show as an option for show(), it seems like it was removed from docs. 

I will try it in a  bit, but doesn’t look like there is a way to use more than one right now.

you do it like shown above:

ads.show( adType, { x=adX, y=adY, testMode=false, appId=appId[adType] } )

you have to create the to types on the admob page and then you use the appid you want to show

example:

local banner = "ca-app-pub-xxxxxxxxxxxxxxxxx/xxxxxxxxxxxx" local interstitial = "ca-app-pub-xxxxxxxxxxxxxxxxx/xxxxxxxxxxxx" function adListener( event ) if event.isError then -- Failed to receive an ad else -- loaded ad sucess end end ads.init( "admob", banner, adListener ) --fullscreen: ads.show( "interstitial", { x=display.screenOriginX, y=display.screenOriginY, appId=interstitial} ) --or banner: ads.show( "banner", { x=display.screenOriginX, y=display.screenOriginY, appId=banner} )

Thanks!  Will give this a try.

This worked thanks, but when an interstitial comes up, it removes the banner ad.  I have it calling a new banner ad when the interstitial comes up to replace it.  No way to say do it when the interstitial closes, so I just have it next line.  Kind of kludgy how it all comes together.

yes, showing one hides the other. I have been using ads.hide() as well before displaying another ad. not sure if its needed or not.

One way of having some control over when to show a banner ad again after a fullscreen would be to have a timer that starts when the fullscreen ad is loaded. Say a timer of 10s and then you hide the ad incase its still up and show a banner ad.

hopefully we will get some way of knowing when a fullscreen has been closed in the future. that and the possibility of preloading a fullscreen before showing it.

Hey,

Is this still an issue for anybody else? The show() link above does not work, but when I added it to my show() by doing this:

ads.show( adType, { x=adX, y=adY, testMode=false, appId=appId[adType] } )

it worked once, but failed to after that. 

I’m using 2014.2155.

Jyrki

Any update on the status of this?  Seems like it still isn’t possible to show both ads with admob.

Looks like the show() appID functionality was removed.

no no, it’s still working fine. just do what the moderator guy said

AppID doesn’t show as an option for show(), it seems like it was removed from docs. 

I will try it in a  bit, but doesn’t look like there is a way to use more than one right now.

you do it like shown above:

ads.show( adType, { x=adX, y=adY, testMode=false, appId=appId[adType] } )

you have to create the to types on the admob page and then you use the appid you want to show

example:

local banner = "ca-app-pub-xxxxxxxxxxxxxxxxx/xxxxxxxxxxxx" local interstitial = "ca-app-pub-xxxxxxxxxxxxxxxxx/xxxxxxxxxxxx" function adListener( event ) if event.isError then -- Failed to receive an ad else -- loaded ad sucess end end ads.init( "admob", banner, adListener ) --fullscreen: ads.show( "interstitial", { x=display.screenOriginX, y=display.screenOriginY, appId=interstitial} ) --or banner: ads.show( "banner", { x=display.screenOriginX, y=display.screenOriginY, appId=banner} )