Re: AdMob Mediation: iAd disappears when app going from background to foreground

928 views
Skip to first unread message

Rajkumar Parameswaran

unread,
Aug 20, 2012, 5:02:47 PM8/20/12
to google-adm...@googlegroups.com
Hey Billy,

So I've looked at this as well and it looks like it may have something to do with this (http://stackoverflow.com/questions/8107558/iads-loading-throttled-after-re-launching-app-from-background-also-happens-in-i).

It looks like if a banner is correctly received, I'm getting the adViewDidReceiveAd: callback but when it fails I'm not getting the didFailToReceiveAdWithError:. I'll file this as a bug but in the meantime, what about if you just hide your banner and show it when you get the adViewDidReceiveAd: callback? Would this remove the white banner issue?

Raj

On Mon, Aug 20, 2012 at 6:39 AM, Billy Kan <bill...@gmail.com> wrote:
Hi,

I am new to AdMob and is using AdMob mediation to serve Ads from AdMob and iAd in an iOS app. It works fine for AdMob. However, for iAd, if I switch my app to background for a while and then back to foreground. The ad will disappear for a while, leaving a blank ad banner and then appear again. A bit more information on my scenario:

- I am using AdMob SDK 6.1.4 running on iOS 5.1. I am running the test on an actual device (iPhone 4S)
- The testing flag of the GADRequest is set to YES.
- I actually have a background task running so the app is in background state and not suspended.
- I have implemented the adViewDidReceiveAd: and didFailToReceiveAdWithError: delegate methods. Throughout the course of disappearance and re-appearance, neither method is called - so I presume the re-appeared Ad is an old Ad.

The iAd developer documentation from Apple explicitly states that an app cannot show a blank ad banner so I am worry that such behavior will cause a rejection. In fact as a precaution, I have considered to check if the GADBannerView  has an Ad loaded when my app enters foreground - but it seems there is no way to do it.

Any help is greatly appreciated.

Thanks.

Billy


--
 
 
 

Rajkumar Parameswaran

unread,
Aug 21, 2012, 12:18:09 PM8/21/12
to google-adm...@googlegroups.com

Hey Billy,

I went through some debugging and saw that throttling message popup, the mediation SDK suppresses some of those ad network specific error messages however which is why you probably didn't see it.

Your hypothesis on having to wait a full refresh period before the blank ad goes away is correct. What we're looking at now if there's a way to make sure that callback gets called through the mediation SDK. It seems like iAd is the only network having this issue.

I agree that the hiding workaround isn't ideal, and will try to continue to come up with a better one while we look at the issue.

To answer your last question, if your first ad request fails with a didFailToReceiveAdWithError:, there will be no automatic refresh. If any request after your first one fails however (assuming one has succeeded), then an automatic refresh will occur. You can check the hasAutoRefreshed property to determine if the failure was part of a server side refresh or you calling loadRequest:

Raj
 
On Tue, Aug 21, 2012 at 8:12 AM, Billy Kan <bill...@gmail.com> wrote:
Hi Raj,

Thanks for the reply. I am not sure if my issue is the same as the link since I did not receive those throttling messages.

To aid the investigation, I have written a test program which has 2 views to show 2 banners - one using the native iAd API and one using AdMob mediation. It seems that the disappearance is a "feature" of iAd that even if I use the native API it happened. The only difference is when I used the iAd API, the delegate methods are called almost immediately after my app goes into foreground (whether it's a failure or success). For AdMob, it seems I need to wait for a full refresh period and during that period it'd be a blank Ad.

For your suggestion, yes I can hide the banner when my app goes back to foreground and then wait for the adViewDidReceiveAd to show it again. However it'd be sub-optimal as the issue only happens for iAd and so I will be hiding the banner even though there is an Ad from AdMob - and wait for at most a minute (my refresh period) to get it back.

Also, I noticed that if I configure mediation to serve iAd 100% and the refresh failed, the didFailToReceiveAdWithError: does get called but then even when iAd is available again (as shown in my iAd native API banner), the AdMob banner won't show any Ad. It leads to my another question: Do I need to call loadRequest again if didFailToReceiveAdWithError: get called?

Thanks!

Billy
--
 
 
 

Rajkumar Parameswaran

unread,
Aug 22, 2012, 10:21:39 AM8/22/12
to google-adm...@googlegroups.com
Sure, we can look into it. I've filed a feature request with our engineering team. Thanks for helping us track this down.

On Tue, Aug 21, 2012 at 7:28 PM, Billy Kan <bill...@gmail.com> wrote:
Hi Raj,

Thanks for the help and I look forward to your update.

Another suggestion I have is if you guys can add a property to GADBannerView to show if an ad is loaded. (Similar to the bannerLoaded property in the iAd native ADBannerView class). I can check this property when my app goes back foreground and hide the ad banner if there is no ad.

Thanks.

Billy

--
 
 
 

Rajkumar Parameswaran

unread,
Feb 8, 2013, 8:14:10 PM2/8/13
to google-adm...@googlegroups.com
Chris, are you still seeing this with the newest iAd adapter? We updated it a while back and stopped getting reports of this issue?


On Tue, Feb 5, 2013 at 11:29 AM, Chris Barrett <ch...@barrett.me.uk> wrote:
Hi Raj

Did you make any progress with this issue? We're seeing iAds disappear still and nothing shows up until the next refresh interval.


Chris

--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rajkumar Parameswaran

unread,
Apr 5, 2013, 7:48:52 PM4/5/13
to google-adm...@googlegroups.com
Hey Subhash,

I believe what's happening here is that when you come back into the foreground with your app, iAd tries to do a refresh. If that ad refresh fails, the AdBanner is hidden. You should still be getting all the correct callbacks and should be able to override this behavior yourself by catching the foregrounding event.

Raj


On Wed, Apr 3, 2013 at 9:14 AM, Subhash Daga <subhas...@gmail.com> wrote:
I'm still seeing this issue. I have the latest iAd adpater (Oct 4, 2012). It seems to happen quite frequently on my device and the general steps are -

1. Make sure iAd is visible in your app
2. Send your app to background
3. Open another app
4. After couple minutes, go back to your app

The iAd disppears and of course nothing shows up until next refresh cycle. I'm on iOS 6.1. 

Thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rajkumar Parameswaran

unread,
Apr 17, 2013, 4:50:33 PM4/17/13
to google-adm...@googlegroups.com
This sounds like a different issue, more akin to the one described here. I'm looking into that one still with our engineers and will have updates on that thread.


On Mon, Apr 15, 2013 at 4:27 AM, Boris Ulicny <boris....@gmail.com> wrote:
I'm seeing this issue too. Even don't need to go to background and back. From time to time, ad just disappears. No delegate method is being called.
Reply all
Reply to author
Forward
0 new messages