Custom AdSize problem

Skip to first unread message

Fabrício Ferracioli

Aug 21, 2014, 8:57:37 AM8/21/14

I'm using google play services lib on Android trying to get a banner with custom size: 588x414px

I created a LinearLayout with a match_parent for width and height, so the available area for the banner is the entire screen.

Following the documentation[1], I created a request with AdSize(588, 414).
On AdListener I'm getting the following error:

"Not enough space to show ad. Needs 588x414 dp, but only has 360x485 dp."

Should I request a different AdSize based on the device dpi, calculating the desired dps size based on my desired pixels values?


Eric Leichtenschlag

Aug 21, 2014, 5:21:04 PM8/21/14
The SDK takes a size in density independent pixels, so you're asking for 588x414dp. But your phone is only 360dp wide in portrait and only has 485dp height after accounting for title and button bars. So 588x414 is just simply too big for that device. You'll need to try something less than 360x485.

If you're looking to do a full screen ad, you probably want to implement interstitial ads. Interstitial ads will always conform to 320x480 or 480x320 size regardless of how big the phone is, so that sized creative in DFP will work for all interstitials on phones.

Reply all
Reply to author
0 new messages