MediaView won't display any images if we use setReturnUrlsForImageAssets(true)

1,848 views
Skip to first unread message

Sam Lu

unread,
Sep 1, 2018, 11:52:10 PM9/1/18
to Google Mobile Ads SDK Developers
google play services: 11.4.2
test on Android 6.x ~ 8.x

If we use NativeAdOptions.Builder().setReturnUrlsForImageAssets(true), MeidaView won't display any images even we call adView.setMediaView(mediaView).

If we pass false to setReturnUrlsForImageAssets(), MediaView can redener the image asset correctly.

Since the new AdMob police ask developers must use MediaView to render image/video, does it means that we have to pass false to setReturnUrlsForImageAssets()?
If so, please note it clearly in the document.

mobileadssdk-a...@google.com

unread,
Sep 3, 2018, 6:17:35 AM9/3/18
to Sam Lu, Google Mobile Ads SDK Developers
Hi,

Thank you for reaching out to us.

The setReturnUrlsForImageAssets() option is used mainly to inform the SDK if the image assets will be downloaded automatically or not. Setting this to true will result to the SDK returning just the URI and Scale properties and not download the image asset/s, thus the Drawable in the returned NativeAd.Image will be null. However, this option is mainly for the NativeAd.Image used when setting the ImageView asset as seen in our sample code.

As per guide, you are correct that you should now use the MediaView asset, instead of the ImageView asset, to render the main image asset in your native ad layout. Since the NativeAd.Image is not used when setting the MediaView, then you don't need to set the setReturnUrlsForImageAssets() option for this. On the other hand, I will double check this with the rest of the team to get more clarity on this then get back to you for any official feedback.

Regards,
Ivan Bautista
Mobile Ads SDK Team 



--

---
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-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/82f22a71-d152-4c5d-b711-158119766af4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mobileadssdk-a...@google.com

unread,
Sep 18, 2018, 6:25:40 AM9/18/18
to Sam Lu, Google Mobile Ads SDK Developers
Hi,

I just want to get back to you on this. 

Given the recent change on having MediaView be used for rendering the main image asset, the setReturnUrlsForImageAssets() option is no longer applicable when requesting Native Ads from AdMob. However, the policy change only applies to AdMob publishers and not for Ad Manager publishers. Thus, the setReturnUrlsForImageAssets() option is still available in the Mobile Ads SDK but only applicable for Ad Manager publishers since Ad Manager publishers are also using the Mobile Ads SDK.

Regards,
Ivan Bautista
Mobile Ads SDK Team


On 09/03/18 18:17:22 mobileadssdk-a...@google.com wrote:
Hi,

Thank you for reaching out to us.

The setReturnUrlsForImageAssets() option is used mainly to inform the SDK if the image assets will be downloaded automatically or not. Setting this to true will result to the SDK returning just the URI and Scale properties and not download the image asset/s, thus the Drawable in the returned NativeAd.Image will be null. However, this option is mainly for the NativeAd.Image used when setting the ImageView asset as seen in our sample code.

As per guide, you are correct that you should now use the MediaView asset, instead of the ImageView asset, to render the main image asset in your native ad layout. Since the NativeAd.Image is not used when setting the MediaView, then you don't need to set the setReturnUrlsForImageAssets() option for this. On the other hand, I will double check this with the rest of the team to get more clarity on this then get back to you for any official feedback.

Regards,
Ivan Bautista
Mobile Ads SDK Team 



On 09/02/18 11:52:10 a0s...@gmail.com wrote:
google play services: 11.4.2
test on Android 6.x ~ 8.x

If we use NativeAdOptions.Builder().setReturnUrlsForImageAssets(true), MeidaView won't display any images even we call adView.setMediaView(mediaView).

If we pass false to setReturnUrlsForImageAssets(), MediaView can redener the image asset correctly.

Since the new AdMob police ask developers must use MediaView to render image/video, does it means that we have to pass false to setReturnUrlsForImageAssets()?
If so, please note it clearly in the document.

--

---
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-sdk+unsubscrib...@googlegroups.com.

Sam Lu

unread,
Sep 18, 2018, 6:33:00 AM9/18/18
to Google Mobile Ads SDK Developers
Thank you for the update. Please don't forget to put a note to the documentation of setReturnUrlsForImageAssets()/MediaView so other AdMob publishers won't make the same mistake as me.

Have a good day.
Sam

mobileadssdk-a...@google.com

unread,
Sep 18, 2018, 11:31:50 PM9/18/18
to Sam Lu, Google Mobile Ads SDK Developers
Hi Sam,

This has been noted by the team. Thank you for bringing this to our attention.

Regards,
Ivan Bautista
Mobile Ads SDK Team



To unsubscribe from this group and stop receiving emails from it, 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.
Message has been deleted

swy

unread,
Sep 26, 2018, 10:45:02 PM9/26/18
to Google Mobile Ads SDK Developers
Hi If we use NativeAdOptions.Builder().setReturnUrlsForImageAssets(false)  may cause Out of memory.Now the new AdMob police ask developers must use MediaView to render image/video; It bothers me~

mobileadssdk-a...@google.com

unread,
Sep 27, 2018, 12:10:24 AM9/27/18
to swy, Google Mobile Ads SDK Developers
Hi,

It's correct that if you are using AdMob Ad Units, in line with the new policy and as per this guide, you need to use the MediaView if you wish to render the main image asset or video asset in your native ad layout. Since the MediaView will render the image asset for non-video native ads, then setReturnUrlsForImageAssets() option is no longer applicable (which is set to false by default).

That said, this should not cause an OutOfMemory on your end as the rendering of the image or video assets should be handled by the SDK accordingly. Do you encounter the OutOfMemory if you test with our sample app?

For us to investigate further, could you create a new thread in the Google Mobile Ads SDK forum and provide to us the following information?
  • Complete device logs (including the OutOfMemory logs) when loading the native ads in question
  • Copy of the project you are working on where the OutOfMemory is reproducible (provide in private using Reply privately to author option)
Regards,
Ivan Bautista
Mobile Ads SDK Team



On 09/27/18 10:36:21 sun...@gmail.com wrote:
Hi If we use NativeAdOptions.Builder().setReturnUrlsForImageAssets(false)  may cause Out of memory.Now the new AdMob police ask developers must use MediaView to render image/video; It bothers me~
 
On Sunday, September 2, 2018 at 11:52:10 AM UTC+8, Sam Lu wrote:
google play services: 11.4.2
test on Android 6.x ~ 8.x

If we use NativeAdOptions.Builder().setReturnUrlsForImageAssets(true), MeidaView won't display any images even we call adView.setMediaView(mediaView).

If we pass false to setReturnUrlsForImageAssets(), MediaView can redener the image asset correctly.

Since the new AdMob police ask developers must use MediaView to render image/video, does it means that we have to pass false to setReturnUrlsForImageAssets()?
If so, please note it clearly in the document.

--

---
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-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Vjy Anand

unread,
Feb 21, 2019, 11:17:49 AM2/21/19
to Google Mobile Ads SDK Developers
What's the difference between ad-manager and Admob? When to use over other? Thanks

mobileadssdk...@google.com

unread,
Feb 22, 2019, 12:58:15 AM2/22/19
to Vjy Anand, Google Mobile Ads SDK Developers
Hi Vjy,

I'm afraid our team (Mobile Ads SDK Team) can only assist you with technical concerns specific to the Mobile Ads SDK. 

For product related questions about AdMob and/or Ad Manager, please refer to the AdMob Help Center and Ad Manager Help Center or raise them over to the Admob Help forum or Ad Manager Help forum.


Regards,
Ivan Bautista
Mobile Ads SDK Team
On 02/22/19 00:17:49 vi...@iavian.com wrote:
What's the difference between ad-manager and Admob? When to use over other? Thanks


On Monday, September 3, 2018 at 3:47:35 PM UTC+5:30, mobileadssdk-a...@google.com wrote:
Hi,

Thank you for reaching out to us.

The setReturnUrlsForImageAssets() option is used mainly to inform the SDK if the image assets will be downloaded automatically or not. Setting this to true will result to the SDK returning just the URI and Scale properties and not download the image asset/s, thus the Drawable in the returned NativeAd.Image will be null. However, this option is mainly for the NativeAd.Image used when setting the ImageView asset as seen in our sample code.

As per guide, you are correct that you should now use the MediaView asset, instead of the ImageView asset, to render the main image asset in your native ad layout. Since the NativeAd.Image is not used when setting the MediaView, then you don't need to set the setReturnUrlsForImageAssets() option for this. On the other hand, I will double check this with the rest of the team to get more clarity on this then get back to you for any official feedback.

Regards,
Ivan Bautista
Mobile Ads SDK Team 



On 09/02/18 11:52:10 a0s...@gmail.com wrote:
google play services: 11.4.2
test on Android 6.x ~ 8.x

If we use NativeAdOptions.Builder().setReturnUrlsForImageAssets(true), MeidaView won't display any images even we call adView.setMediaView(mediaView).

If we pass false to setReturnUrlsForImageAssets(), MediaView can redener the image asset correctly.

Since the new AdMob police ask developers must use MediaView to render image/video, does it means that we have to pass false to setReturnUrlsForImageAssets()?
If so, please note it clearly in the document.

--

---
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-sdk+unsubscrib...@googlegroups.com.

--

---
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-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages