Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Ads Interface issue: iAd banner Stops displaying after app is sent to background — Gideros Forum

Ads Interface issue: iAd banner Stops displaying after app is sent to background

eezingeezing Member
edited May 2014 in Bugs and issues
iAd banner appears to stop displaying when:

1. On return from device sleep lasting around a minute or more.

2. On return from app background state lasting around a minute or more.

Fail and error events aren't not being triggered so not sure what the issue is.

Any ideas?


Comments

  • ar2rsawseenar2rsawseen Maintainer
    Hello @eezing
    Yes, true, just tested with AdsInterface and simple iad implementation, the behavior is the same.
    After coming back from background iad tries to refresh the ad, in which case it can fail to do so.
    But I do receive AD_FAILED event.
    Even trying on my published apps, I see it being fall backed to other ad provider in case of failure.

    Which IOS version and device you tested it on?
    Also can you provide a sample code that is not working for you?
  • eezingeezing Member
    @ar2rsawseen

    OK, it appears the AD_FAILED event is working fine. Event error message:

    "The operation couldn’t be completed. Ad was unloaded from this banner"

    So I guess my issue is that I'm seeking the same behavior as the Gideros iAd plugin where it would re-load upon fail.
  • ar2rsawseenar2rsawseen Maintainer
    edited May 2014
    @eezing
    easy
    local iad = Ads.new("iad")
    local requestCount = 0
    iad:addEventListener(Event.AD_FAILED, function(e)
        --completely optional, but 
        --in case user does not have an internet connection, 
        --lets not be inefficient
        --and stop at 10 consequent requests
        requestCount = requestCount + 1
        if requestCount < 10 then
            iad:showAd("banner")
        end
    end)
    iad:addEventListener(Event.AD_RECEIVED, function(e)
        requestCount = 0
    end)
    iad:showAd("banner")
  • eezingeezing Member
    @ar2rsawseen

    Ok, that makes sense. I'll give that a shot, thanks for the help!
Sign In or Register to comment.