In my App update (still in development), I have a 130pt tall Native Ads banner. Screenshot below.
I have 1 Image View (for App Icon / App install ads) stacked on top of a GADMediaView (for all other ads). I am limited in banner height, so I am only able to display one of these elements based on the Ad type.
Based on the Ad type returned, I display either the App Icon OR Media View with the code below:
nativeAdAppInstallAppIcon?.image = nativeAd.icon?.image
if nativeAd.icon == nil {
nativeAdAppInstallAppIcon?.isHidden = true
mediaView?.isHidden = false
} else {
nativeAdAppInstallAppIcon?.isHidden = false
mediaView?.isHidden = true
}
It works - but not 100% of the time. Sometimes NO image will show and I get this error: MediaView not used for main image or video asset.
How can I satisfy this error?
Based on the Admob guidelines on this page: https://support.google.com/admanager/answer/7031536 it seems I need both the Media View AND App Icon - but there is a space constriction with smaller Native Ads like the one I am designing.
Thank you.
Hi Joe,
Thank you for contacting the Mobile Ads SDK support team.
Yes, you need both MediaView and AppIcon. MediaView is required to render the main video or image asset in an ad. You can use ImageView to render the logo and app icon assets. For native video ads, the main asset MediaView must be at least 120x120pts (iOS). For the space restrictions Scaling an image or video element can be done by modifying the aspect ratio. However, distorting (stretching/squeezing) the image or video by changing its aspect ratio is not allowed. For non-video ads, the width of the primary image element can be cropped symmetrically by up to 10%. Cropping by height is not allowed. Refer to the small and medium-sized Ads guide for more information. Refer to Examples on GitHub as a reference for your implementation.
I hope this helps! Let me know if you have additional questions.
![]() |
Mobile Ads SDK Team |
Hi,
As mentioned in the documentation, MediaView is required to render the main video or image asset in an ad. You can use ImageView to render the logo and app icon assets.
For us to investigate more on this issue. Could you please share your sample application where the issue is reproducible.
If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:
2. Fill out all fields, and attach your file(s).
3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.Hi,
We are unable to locate the sample application in the provided link. Could you please reshare the sample application again with us?
Hi,
Thank you for getting back to us.
I will check with our team regarding your query and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.
![]() |
Mobile Ads SDK Team |
![]() |
|
![]() |
|
Enoch Francis invites you to earn money together! No investment required, everyone can withdraw money! -> https://www.freeagqstar.top/p?0129797803862207069&s=mail someone has just cash out today
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-admob-ads-sdk/6367af6e-040b-41ea-a58c-bd4d4a18aab1n%40googlegroups.com.
![]() |
|
[2025-02-24 19:13:40Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vGadL:ref" (ADR-00269577)