AdMob Smart Banner Size Qualifiers

320 views
Skip to first unread message

Darryl Hnatiuk

unread,
Jul 5, 2017, 2:25:13 PM7/5/17
to Google Mobile Ads SDK Developers
Hi,

My question pertains to correct configuration when using AdMob's Smart Banners. Currently we allocate a static area for banner ads (AdMob and other networks, no mediation) by setting the desired height of the area based upon size qualifiers which will end up being either 50dp or 90dp for consistency across networks. The ad is being created via a layout XML file.

For the most part this has worked out fine, however there have been some reports about some devices not showing the ad because the ad area was smaller than the ad that was being requested. One particular example was the OnePlus 3, but may also happen on Galaxy Notes. I don't have any of these physical devices and have had trouble replicating the issue on a Virtual Device, however I understand what is happening, and the fact that the size qualifiers I've tried are not correct or comprehensive enough.

So my question is, can the size of the ad area be determined by size qualifiers for Smart Banners to avoid these edge case failures? Previously I was using qualifiers such as "values-sw600dp" and had also tried "values-h720dp", however they don't appear to catch these cases and end up with a requested ad size being different than the layout size.

Any guidance would be much appreciated as far as the proper way to do this.

Darryl
Message has been deleted

Deepika Uragayala- MobileAds SDK team

unread,
Jul 5, 2017, 3:51:39 PM7/5/17
to Google Mobile Ads SDK Developers
Hi Darryl,

If the screen height is less than 400dp, the SDK will request for 32dp height smart banner. You need to consider this 32dp along with 50dp and 90dp if you want to show smart banner ads for smaller screens. You can read more about this in our documentation. Also, note that the size of the banner is only determined by the screen size and the type of device (phone or tablet).

Regards,
Deepika Uragayala
Mobile Ads SDK Team

Darryl Hnatiuk

unread,
Jul 5, 2017, 4:44:17 PM7/5/17
to Google Mobile Ads SDK Developers
Hi,

Thanks for the reply. Yes, I'm aware of the 32dp. Since the ad area will be used across multiple ad networks, with custom fallback handling and ad network selection etc. 50dp will be the minimum and the 32dp ad will be placed within that area and we're fine with that.

While I appreciate your response, it didn't really answer my question. What I'm asking is can the size of our ad area be determined prior to requesting a smart banner ad with resource size qualifiers of some sort that will match the AdMob's smart banner sizing code? Or, does that mean that the "screen size" value being used can only be determined via Java using DisplayMetrics. Could you also explain what you meant by the "type of device (phone or tablet)" in relation to the size of the ad being requested and where you're getting that value?

Thanks,

Darryl

Deepika Uragayala- MobileAds SDK team

unread,
Jul 6, 2017, 1:12:54 PM7/6/17
to Google Mobile Ads SDK Developers
Hi Darryl,

The SMART_BANNER ad size will be dependent on the device's screen height. You can check out this table for more information.

Let me answer your question in detail here:

 
"can the size of our ad area be determined prior to requesting a smart banner ad with resource size qualifiers of some sort that will match the AdMob's smart banner sizing code?"

The size of the banner can be determined before an ad request is made and the two qualifiers are -
1) The above mentioned device height
2) In certain cases, if a device has height more than 720dp but is a phone, the height of the SMART_BANNER will remain at 50dp.

Let me know if you have any other questions. I will be happy to assist you.

Regards,
Deepika Uragyala
Mobile Ads SDK Team

Darryl Hnatiuk

unread,
Jul 6, 2017, 7:46:03 PM7/6/17
to google-adm...@googlegroups.com
Hi,

After some further testing and investigation I now know why "values-h720dp" didn't work on the problematic device and it appears to be due to the fact that it appears AdMob uses DisplayMetrics for the height which is a different value than "values-h720dp" which doesn't contain some other UI elements such as system bar. So I understand that aspect of previously not being able to properly detect it and can work around that part.

However could you elaborate on what you said in #2 - "In certain cases, if a device has height more than 720dp but is a phone, the height of the SMART_BANNER will remain at 50dp."?

Specifically what criteria would you use in those cases to determine if the device is a "phone" or not? The reason I ask is because the initial report of the problem was on a "OnePlus 3", which is a phone, and have seen similar reports on these forums and elsewhere about similar behavior on "Samsung Galaxy Note" models which are phones as well. Is the criteria that you use in these cases something I can query myself as well?

Darryl


--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/--82_o4HTrU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Deepika Uragayala- MobileAds SDK team

unread,
Jul 7, 2017, 1:46:28 PM7/7/17
to Google Mobile Ads SDK Developers
Hi Darryl,

Thanks for getting back to us. 

"In certain cases, if a device has height more than 720dp but is a phone, the height of the SMART_BANNER will remain at 50dp."?
 All you need to know about this is that if the device has a screen height of more than 720 dp and if it's a phone, then the height of the SMART_BANNER would be 50dp. There are no other specific conditions other than these for the height of the SMART_BANNER.

Regards,
Deepika Uragayala
Mobile Ads SDK Team


On Thursday, July 6, 2017 at 7:46:03 PM UTC-4, Darryl Hnatiuk wrote:
Hi,

After some further testing and investigation I now know why "values-h720dp" didn't work on the problematic device and it appears to be due to the fact that it appears AdMob uses DisplayMetrics for the height which is a different value than "values-h720dp" which doesn't contain some other UI elements such as system bar. So I understand that aspect of previously not being able to properly detect it and can work around that part.

However could you elaborate on what you said in #2 - "In certain cases, if a device has height more than 720dp but is a phone, the height of the SMART_BANNER will remain at 50dp."?

Specifically what criteria would you use in those cases to determine if the device is a "phone" or not? The reason I ask is because the initial report of the problem was on a "OnePlus 3", which is a phone, and have seen similar reports on these forums and elsewhere about similar behavior on "Samsung Galaxy Note" models which are phones as well. Is the criteria that you use in these cases something I can query myself as well?

Darryl

Darryl Hnatiuk

unread,
Jul 7, 2017, 2:36:11 PM7/7/17
to google-adm...@googlegroups.com
Hi,

I'm sorry but saying "if the device has a screen height of more than 720 dp and if it's a phone, then the height of the SMART_BANNER would be 50dp" is simply not true and is what prompted the original question for detecting this.

The device previously mentioned (OnePlus 3) is a "phone" with default display settings but has a height greater than 720dp and the result of the ad request for SMART_BANNER is a 90dp ad height. This behavior can also be replicated on a virtual device with a specific smallest width.

So either the criteria is height alone, or there's some other criteria you're using to make that decision that may not be correct on all devices and situations.

Darryl


To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Deepika Uragayala- MobileAds SDK team

unread,
Jul 7, 2017, 7:00:16 PM7/7/17
to Google Mobile Ads SDK Developers
Hi Darryl,

Again, this is typically the case and not always. I would not be able to provide a detailed list of phone's which would only show 50dp even if the height of the device is more than 720dp. You would not be able to pre-determine this and the only way would be to use the AdListener and know the size of the received ad and then update your UI.

Let me know if you have any other questions.

Regards,
Deepika Uragayala
Mobile Ads SDK Team


On Friday, July 7, 2017 at 2:36:11 PM UTC-4, Darryl Hnatiuk wrote:
Hi,

I'm sorry but saying "if the device has a screen height of more than 720 dp and if it's a phone, then the height of the SMART_BANNER would be 50dp" is simply not true and is what prompted the original question for detecting this.

The device previously mentioned (OnePlus 3) is a "phone" with default display settings but has a height greater than 720dp and the result of the ad request for SMART_BANNER is a 90dp ad height. This behavior can also be replicated on a virtual device with a specific smallest width.

So either the criteria is height alone, or there's some other criteria you're using to make that decision that may not be correct on all devices and situations.

Darryl

To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages