Bug in Native Ad implementation/misleading implementation doc

117 views
Skip to first unread message

Wojtek

unread,
Nov 24, 2020, 8:25:39 AM11/24/20
to Google Mobile Ads SDK Developers
Hi,

I have followed the official implementation guide for Native Advanced ads and found a bug that's going to hurt advertisers. 

Basically a wrong media content image is show for wrong ads in Recycler view when setMediaContent method is used (as per offical implementation how to display ad in displayUnifiedNativeAd on https://developers.google.com/admob/android/native/advanced):

Ads after scrolling down and then back up have wrong image (but correct title and icon).
This happens only to the image ads (video ads are fine)
Below is screenshot - see where Hotel Ad that previously showed hotel now is showing shoe store website image.
Screenshot_20201124-141600_Native Advanced RecyclerView Example.jpg

The issue happens when adView.getMediaView().setMediaContent(nativeAd.getMediaContent()); is called to populate ad view in recycler view. Removing it fixes the issue yet is misleading because official doc is showing its necessary to display images and video....
Checked on sdk 19.5.0 and 18.x.x  and on offical github sample for displaying native ads in recycler view from google codelabs


Mobile Ads SDK Forum Advisor Prod

unread,
Nov 24, 2020, 2:35:27 PM11/24/20
to vin...@gmail.com, google-adm...@googlegroups.com
Hi Wojtek,

Thank you for bringing this question to our attention. I was able to look over the screenshot, and see what you are saying. Have a few suggestions, based on what you have stated.First I would suggest to try with our sample app and using our sample Ids. Also avoid testing with live ads, as it appears that you are doing that from the screenshot.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q27wGVK:ref

Wojtek

unread,
Nov 24, 2020, 2:53:21 PM11/24/20
to Google Mobile Ads SDK Developers

Hi William,

Actually this is codelabs GitHub example with test ads. The codelabs example does not include the call to setMediaContent call and once it's added the images after scrolling down and back up are broken.

The problem is codelabs example is not official implementation guide and when someone follows the implementation example from developers.google.com then is likely to implement it with the call and probably won't notice the bug as requesting test ads quite often returns set of same ads. 

Also that brings the question when is setMediaContent call required as both video and image ads are properly displayed without it?

Wojtek


Wojtek

unread,
Nov 24, 2020, 3:02:36 PM11/24/20
to Google Mobile Ads SDK Developers
Also wanted to mention that the example app is a single ad implementation and does include a call

// The headline and mediaContent are guaranteed to be in every UnifiedNativeAd.
adView.getMediaView().setMediaContent(nativeAd.getMediaContent());

The problem is when it's put into recycler view it'll break the images. Somehow this call replaces the main image drawable reference in previous feed item with the currently displayed

Mobile Ads SDK Forum Advisor Prod

unread,
Nov 24, 2020, 8:41:09 PM11/24/20
to vin...@gmail.com, google-adm...@googlegroups.com

Hi Wojtek,

Thank you for providing more details on your concern.

I was able to replicate the issue on my own end by adding the setMediaContent call to the sample project from Codelab. I will file a bug for this particular issue, and will keep you updated on this.

Going forward, the expectation is that you would call the setMediaContent function at the same time as you call the other set functions (e.g. setHeadlineView), as seen in the AdMob Native Advanced Example from this page.

Google Logo
Ziv Yves Sanchez
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q27wGVK:ref

Mobile Ads SDK Forum Advisor

unread,
Dec 12, 2022, 12:58:05 PM12/12/22
to vin...@gmail.com, google-adm...@googlegroups.com
Hello,

I hope you're safe and doing fine.

I just want to circle back on this. The team provided their feedback and mentioned that the implementation looks fine upon further review of the videos and tagged this as normal behavior.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 
 

ref:_00D1U1174p._5004Q27wGVK:ref
Reply all
Reply to author
Forward
0 new messages