Not enough space to show ad

1,208 views
Skip to first unread message

Lisitso

unread,
Sep 26, 2013, 11:17:55 AM9/26/13
to google-adm...@googlegroups.com
Hi Eric,
I'd like to know if there's a way to catch the "Not enough space to show ad" case.
The problem indeed is that the banner is not shown but the SDK doesn't call
any failure method on the adListener, preventing the backfill chain to work properly.

Moreover, is there a public method on the SDK to use to check if a region
size of the screen can contain and/or accept the banner?

Thanks,
Andrea

Klaas

unread,
Sep 27, 2013, 5:39:29 AM9/27/13
to google-adm...@googlegroups.com
Hi Eric,

this is also an Issue that I am facing at the moment.

We would like to embed an AdView inside of a ViewGroup which adds a padding of 8dp on the left and right side. Thus, on a smartphone with a width of 480px and a density factor of 1.5 (e.g. Galaxy S2) the AdView has a width of 456px (480px - 2 * 8 * 1.5). When requesting a banner with an AdSize of 320x50 (which is the must use adSize), we get a log message, that there is not enough space to show the ad. The SDK needs a width of 480px for the ad (320 * 1.5) but there are only 456px available.

Is there any possibility to resize (shrink) the ad to fit the available space, or _must_ an AdView always fit to the hole display width on such devices? It would be ok to shrink the adView as long as it keeps the aspect ratio and still uses the 320x50 adSize

The SDK calls the method onReceiveAd(), also if there is not enough space available. Is there any other callback/way to get the feedback that the ad could not be shown?

Best,
Klaas

William Ferguson

unread,
Sep 28, 2013, 6:21:21 AM9/28/13
to google-adm...@googlegroups.com
No and no. It would be nice to be able to catch this so it could be logged to a bug tracking server. I messed up at least one device config in my last release that isn't serving ads because of this exact issue. It would have bee good to have found out about it as soon as the release was deployed.

logcat will show you if the space is not big enough, if you have a device around.

William

Lisitso

unread,
Oct 5, 2013, 6:20:11 PM10/5/13
to google-adm...@googlegroups.com
Hi Eric,

any feedback from you?

Thanks,
Andrea

Eric Leichtenschlag

unread,
Oct 7, 2013, 10:24:45 PM10/7/13
to google-adm...@googlegroups.com
There is not a way to catch in code that this is happening. It is unfortunate that it prevents mediation from trying another network, but that also means any similarly-sized ads you got from another network would also be too small anyways. We recommend using test ads and make sure that the ad slot fills before releasing your apps.

Thanks,
Eric

Lisitso

unread,
Oct 8, 2013, 11:36:52 AM10/8/13
to google-adm...@googlegroups.com
unfortunately I cannot agree with you.
I think it's a fault from the sdk to call the onsuccess callback method if the banner could not be displayed for any reason.
More, I think it not true that there's no way to catch what's happening because if in the log you're able to write current region size and wanted size, it means you're able to calculate it and only need to propagate the information (or simply let it available)
Finally, it's not true that any other network won't work too: the issue just happens because
admob currently wants to fill the request with a large banner and doesn't try to fill with a smaller creativity,
if has not enough space to do it.
(might use the standard 320x50 like other networks will do it)

For example, on my tablet, admob wants to display a banner bigger than the region available and doesn't try to use a smaller one.
In the same situation InMobi gives the 320x50 format that will fit in the region available: so the impression is real
as the possibility to click it.
The worst thing is, I repeat, that in these cases admob return success while not displaying any banner and this broke any mediation backfill chain.

Testing with the test-ads is not enough because the region available depends on the display size of the device and it is not possible to cover all test cases.
Why not evalutate to improve the admob sdk? You could start by calling the failure callback (instead of success) if the banner couldn't be displayed because of not enough space. As you write in the log.


Thanks,
Andrea

Eric Leichtenschlag

unread,
Oct 9, 2013, 3:03:08 PM10/9/13
to google-adm...@googlegroups.com
I think there was mis-communication before. Admob does catch this error and theoretically could pass it along, but the fact is it doesn't today.

Where I disagree is that I don't believe another network will provide an appropriately sized ad. If you want a 320x50 format from InMobi, why are you requesting something bigger in mediation? You should expect an ad that can be as big as your request size (in density pixels), and so your view needs to be at least (request_size * density) pixels wide.

Lisitso

unread,
Oct 10, 2013, 5:30:40 AM10/10/13
to google-adm...@googlegroups.com
I'm using smartbanners with admob while not with inmobi. This is because InMobi works good.

I hope you will fix the sdk calling the failure method instead of the success one,
and give the ability to check the wanted region size.

Regards,
Andrea

Eric Leichtenschlag

unread,
Oct 14, 2013, 9:24:08 AM10/14/13
to google-adm...@googlegroups.com
I've filed a bug to return no fill for AdMob in this case, but I still fundamentally disagree with using different ad sizes for different networks.

Smart banners requires the AdView to be the full width of the device with no padding. If you don't give it enough space, AdMob will never return an ad. If the bug is fixed, it'll let you backfill to InMobi, but it'll start masking the sizing problem you have with AdMob. If AdMob fails due to a sizing error, and InMobi backfills with an ad (assuming bug is fixed), you'll only get an onReceiveAd callback.

Lisitso

unread,
Oct 15, 2013, 8:45:00 AM10/15/13
to google-adm...@googlegroups.com
Eric, thanks for the attention on this topic.
I think that there should be no doubt that the sdk has to call
onReceiveAd *only* in the case that a banner is returned and displayed.
If for any reason tha banner couldn't displayed (for example not enough space)
it is supposed onFailedToReceiveAd to be called.

Is this the way in which you intent to fix?
please confirm it because I'm not sure we're of the same idea.

Regards,
A.

Eric Leichtenschlag

unread,
Oct 15, 2013, 1:22:10 PM10/15/13
to google-adm...@googlegroups.com
When using mediation, you only get 1 callback (either onReceiveAd or onFailedToReceiveAd) per request. The behavior you'd see if this issue was fixed is:

Assume you have mediation enabled with networks. A, B, and C. If A fails because of no fill, B (lets say AdMob in this example) fails because of not enough space, and C succeeds, you'll only get an onReceiveAd callback because C succeeded.

The way it works today is A would fail because of no fill, B (AdMob) would succeed and invoke onReceiveAd but then not show the ad because it doesn't have enough space.

In mediation, AdMob abides to the same protocol as every other network. There isn't be a special callback from AdMob for not enough space in mid-mediation flow. You would only get this callback if you were using AdMob directly and this issue happened, via an onFailedToReceiveAd call with not enough space error message (again, assuming this gets fixed).

At least with today's behavior, it's more apparent that there is an issue because AdMob stops the flow and you're more likely to see the error. If this were fixed, it would mask the AdMob no-fill issue, and you may release your app with a 0% chance of getting AdMob fill. Either way, the ball is still in your court to give AdMob enough space to show the particular ad size you've requested.

Thanks,
Eric

Jens Wangenheim

unread,
Jan 16, 2015, 10:52:53 AM1/16/15
to google-adm...@googlegroups.com
Any progress in this topic so far?
I am currently facing this problem, as my app is downward compatible to API level 9, there are some users with very small (<300dp) displays. There is no available banner size for such small displays, so I want to show a png banner from our sever as a fallback. Any chance to catch the "not enough space" error now?


Am Donnerstag, 26. September 2013 17:17:55 UTC+2 schrieb Lisitso:

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Jan 16, 2015, 2:39:59 PM1/16/15
to google-adm...@googlegroups.com
At the current time, the SDK's behavior is to simply log that the space provided isn't enough to display the ad.  We recommend that those developers concerned about screen size perform a check in their code prior to making a request.

-Andrew

Cesar Enrique Prado Vereau

unread,
Mar 29, 2015, 1:06:16 PM3/29/15
to google-adm...@googlegroups.com
Eu resolvi este problema colocando no AndroidManifest.xml as seguintes linhas:

<uses-sdk
        android:minSdkVersion="9"
        android:targetSdkVersion="22"/>

César Vereau
Reply all
Reply to author
Forward
0 new messages