Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Ads:showAd("interstitial") response delayed — Gideros Forum

Ads:showAd("interstitial") response delayed

totebototebo Member
edited August 2014 in Bugs and issues
Hi guys,

Interstitials that have had the Event.AD_RECEIVED triggered sometimes are delayed several seconds, and sometimes there is never a response after the Ads:showAd("interstitial") is called.

What's the best way of dealing with this? I want to avoid interstitials suddenly popping up in the middle of a game.

Cheers,

Niclas
My Gideros games: www.totebo.com

Comments

  • ar2rsawseenar2rsawseen Maintainer
    edited August 2014
    Interesting, did not encounter such cases

    Here is my AdManager class:

    The way I use it is simple:

    in the main lua create global instance:
    admngr = AdManager.new()
    on level start load ad:
    function LevelScene:init()
        admngr:loadInterstitial()
    end
    function LevelScene:lost()
        admngr:showInterstitial()
    end
    Similar goes with banners:
    function LevelScene:init()
        admngr:showBanner()
        --admngr:hideBanner()
    end
    zip
    zip
    AdManager.zip
    1K
  • Thanks, your ad manager looks neat. So in theory there should always be a callback to pick up (Event.AD_DISPLAYED, Event.AD_ACTION_END and Event.AD_FAILED are probably the most relevant), regardless quality of connection etc?
    My Gideros games: www.totebo.com
  • @totebo
    in theory yes
    Each loadAd should dispatch AD_FAILED or AD_RECEIVED
    Each showAd should dispatch AD_FAILED or AD_DISPLAYED (and maybe AD_RECEIVED if ad was not previously preloaded)
Sign In or Register to comment.