CoronaLabs please look - Prevent AdMob Interstitial to fire mid game

ADMOB - AND ANY AD INTERSTITIAL FOR THAT MATTER -SHOWS AT RANDOM TIMES, EVEN IF I CALL ADS.HIDE() AND EVEN IF I CALL ADS.HIDE() IN EVENT.ISERROR IN CASE IT GETS FIRED MID-GAME!

I’m having a problem where admob and other interstitials get displayed at the wrong times - in the middle of the game action and not after scene is complete, like they should have.

-> I also call ads.hide() upon entering the scene, but it does nothing and the interstitials are still being fired mid game… <-

I strongly believe there should be two functions:

ads.load()       and only then

ads.show()

----->>  so we can check if the ads actually loaded/have been received/are ready   before trying to show them

  • also, ads.hide() in case of banner ads, in my opinion, should only hide the banner and not destroy it, as I noticed the banners get delayed too if you hide and show them often ( basically recreate them all the time - that can breach advertising policies as well! )

  • this would again require two functions ads.hide() and ads.end();  or something like that

I added a listener in ads.init to check for event.isError, 

but that’s already too late as - correct me if I’m wrong - it only catches the error if the ad could not be SHOWN.

I did try to fix the problem by calling ads.hide() if event.isError gets triggered in ads.init() by ads.show(), but it does nothing and ad still shoots up and stays there…

— >> THE PROBLEM IS THAT interstitial ads aren’t received at the right time, SPECIALLY ON SLOW MOBILE CONNECTIONS, and when they do get in cache later, they then just fire at will… even if I call ads.hide()

  • Now when I’m programming in Objective C, I use admob’s delegate callback methods to check if the interstitial ad has been received, set a flag and then check that flag before showing the ad, i also check if game is paused before presenting the ad.

That’s why it’s essential to first call   -   a load function   -  to know if the ad is even available to be shown… AND NOT TO SHOW THE AD AT THE INAPPROPRIATE TIMES!

Please kindly respond

Thank you

Anyone?

Please file a bug report.   You will need a project that shows the problem complete with the build.settings and config.lua that you are using.  Every time we bring issues like this up with Engineering they ask where is the bug report and they want to see code that’s failing.  It’s very inefficient on their time to have to try and re-create these issues.

Thanks

Rob

Anyone?

Please file a bug report.   You will need a project that shows the problem complete with the build.settings and config.lua that you are using.  Every time we bring issues like this up with Engineering they ask where is the bug report and they want to see code that’s failing.  It’s very inefficient on their time to have to try and re-create these issues.

Thanks

Rob

I had same problem then realised i had it triggered with system resume. It seems when you close the full screen ad, it goes into resume mode. Not saying this will fix your problem but worth looking at as mine now works.

The listener is also called when an ad is shown (isError=false in this case).

Did you try adding a “canShowAds = true/false” flag and just calling ads.hide() in the listener if canShowAds=false and isError=false?

I do agree though that an ads.load() function would be nice.

fwiw: most of the “nicer” third-party ad libraries, including revmob and chartboost, have this sort of functionality - that is, there are “load/precache/create” -type methods that you can call in advance of “show”. and typically there are corresponding “destroy/release” -type methods apart from “hide”.

as implemented in the ads library, i think only Vungle “sort of” supports something similar by at least immediately returning false from show() if cache isn’t already available (probably because since it’s video, that behavior is essentially required – it’d be entirely unusable if it behaved as other plugins where show() *starts* the download, cuz user would wait forever til megs of video buffer filled enough to actually start playing)

I’ve seen admob take nearly a minute (on a strong wifi connection) to actually show up after calling show(). No idea why, just happens. Meanwhile, player has potentially advanced well-beyond where that banner was appropriate, may even be on an end-game interstitial from some OTHER provider!, and along comes admob just popping up whenever/wherever it wants. :smiley: As ingemar notes, you can try “global” flags in the listener, and hide immediately upon show, but that can get tricky if you’re not careful, and you won’t (typically? maybe just android? fact-check me, ymmv) get the event timely enough to prevent at least a brief display.

legacy AdMob library has interstitial.isLoaded() function.

In my Corona games interstitial adMobs ads are called before the game but showed during the gameplay when user already playing which is totally ridiculous… but we can’t control it in our beloved Corona…

Actually upon further testing. The full screen ads come up  randomly in game time. The refresh must be firing  off even with hide turned on. Its currently useless! Edit possibly its really delayed in coming  up so if it doesnt come up when its supposed to it still comes up during play later on. Im just removing it and  keep just a banner for now.

Thank you guys for keeping the topic going!

Ingemar, thank you I have tried that before, yet with no results, like others have noticed, there is something wrong with ads.show() and no matter what i do, nothing seems to prevent the ads from fireing whenever they please… 

Even if we did get it working, that would still mean that only less than 10% of the time the ads would actually show when theyre supposed to, which would render them useless…

An ads.load() method is essential!!

There is a feature request here, so please vote to implement it:

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/5222567-preloading-ad-banner-interstitial-before-showing-i

Also please as many of you as you can, post a BUG REPORT WITH SOURCE TO REPRODUCE THIS PROBLEM, the more of us there are, the more seriously they’ll take it, and move its importance up before other not so important issues (I’d say monetisation is #1 priority to keep us afloat and producing quality content! 

They have to revamp the adMob ads code anyhow in the next few months to comply with Googles Play Store policies, so I’d say this is the PERFECT TIME TO FIX THIS ISSUE AS WELL.

Please post your findings and support and keep the topic going.

Thank you :slight_smile:

I had same problem then realised i had it triggered with system resume. It seems when you close the full screen ad, it goes into resume mode. Not saying this will fix your problem but worth looking at as mine now works.

The listener is also called when an ad is shown (isError=false in this case).

Did you try adding a “canShowAds = true/false” flag and just calling ads.hide() in the listener if canShowAds=false and isError=false?

I do agree though that an ads.load() function would be nice.

fwiw: most of the “nicer” third-party ad libraries, including revmob and chartboost, have this sort of functionality - that is, there are “load/precache/create” -type methods that you can call in advance of “show”. and typically there are corresponding “destroy/release” -type methods apart from “hide”.

as implemented in the ads library, i think only Vungle “sort of” supports something similar by at least immediately returning false from show() if cache isn’t already available (probably because since it’s video, that behavior is essentially required – it’d be entirely unusable if it behaved as other plugins where show() *starts* the download, cuz user would wait forever til megs of video buffer filled enough to actually start playing)

I’ve seen admob take nearly a minute (on a strong wifi connection) to actually show up after calling show(). No idea why, just happens. Meanwhile, player has potentially advanced well-beyond where that banner was appropriate, may even be on an end-game interstitial from some OTHER provider!, and along comes admob just popping up whenever/wherever it wants. :smiley: As ingemar notes, you can try “global” flags in the listener, and hide immediately upon show, but that can get tricky if you’re not careful, and you won’t (typically? maybe just android? fact-check me, ymmv) get the event timely enough to prevent at least a brief display.

legacy AdMob library has interstitial.isLoaded() function.

In my Corona games interstitial adMobs ads are called before the game but showed during the gameplay when user already playing which is totally ridiculous… but we can’t control it in our beloved Corona…

Actually upon further testing. The full screen ads come up  randomly in game time. The refresh must be firing  off even with hide turned on. Its currently useless! Edit possibly its really delayed in coming  up so if it doesnt come up when its supposed to it still comes up during play later on. Im just removing it and  keep just a banner for now.

Thank you guys for keeping the topic going!

Ingemar, thank you I have tried that before, yet with no results, like others have noticed, there is something wrong with ads.show() and no matter what i do, nothing seems to prevent the ads from fireing whenever they please… 

Even if we did get it working, that would still mean that only less than 10% of the time the ads would actually show when theyre supposed to, which would render them useless…

An ads.load() method is essential!!

There is a feature request here, so please vote to implement it:

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/5222567-preloading-ad-banner-interstitial-before-showing-i

Also please as many of you as you can, post a BUG REPORT WITH SOURCE TO REPRODUCE THIS PROBLEM, the more of us there are, the more seriously they’ll take it, and move its importance up before other not so important issues (I’d say monetisation is #1 priority to keep us afloat and producing quality content! 

They have to revamp the adMob ads code anyhow in the next few months to comply with Googles Play Store policies, so I’d say this is the PERFECT TIME TO FIX THIS ISSUE AS WELL.

Please post your findings and support and keep the topic going.

Thank you :slight_smile:

Oh boy, what a mess this AdMob interstital is.

In event.type == “applicationResume” I call ads.show(“interstitial”, {…})

Once you’ve ask for it - YOU ARE GONNA GET IT! :rolleyes:   - no matter what.

It matters not what flags you set and when or how often you call ads.hide() … it’s like a sputtering missile. You can’t take it out (BANG!) and you don’t know when it’s gonna hit (KABOOM!)

@Ingemar - tried your idea in the ad listener. Nada. Not even the nuclear (continuing with the missile analogy!) option:

timer.performWithDelay(0, function() ads.hide() end, 0)

Corona subscription up next month. Delayed Admob banners on Android, no image attachment on Twitter for Android (so, basically no usable social media plugin on Android that I have paid for) and now this PITA.

To renew or not to renew - that is the question! :smiley:

Is there a bug report number for this interstitial issue?

I submitted one, but can’t remember it’s number - still, NOTHING HAPPENED!

Could you pass this on to that department please?

It’s a HUGE ISSUE, as I was developing a game, with a gameplay that it’s only source of revenue could be achieved with interstitials and nothing else, due to it’s design, and i’ve had to put it on hold until I can actually make it work like that, due to this issue…

As the poster above said, this also made me question buying a paid license, if I can’t make a game that could monetise…

Again please, do notify the bugs / new features department, otherwise nothing will get done…

Thank you