NativeAdView.setAdChoicesView() is not working

1,279 views
Skip to first unread message

S헬스

unread,
May 16, 2018, 5:53:54 AM5/16/18
to Google Mobile Ads SDK Developers
I know AdChoices icon is added automatically by admob.
But I want to change the adChoices icon, so I make AdChoicesView object and set it to NativeAdView like NativeAdView.setAdChoicesView(). (To show custom ad choices icon)
But NativeAdView.setAdChoicesView() is not working.

I think adSense info page should be shown when I click adChoicesView icon.
But ad page is showing...
Ad page should be shown when I click image or title (not ad choices view)

How to show adSense info page when i click custom AdChoicesView?? (Is it impossible?)


ex)

private NativeAdView mNativeAdView;
private AdChoicesView mAdChoicesView;
private ImageView mAdImageView;

onCreate() {

    mAdChoicesView.setBackground(R.drawable.custom_ads_icon); // set custom icon to adChoicesView

    mNativeAdView.setAdChoicesView(mAdChoicesView); // not working : AdSense info page is not showing when click mAdChoicesView. Ad page is showing.

    mNativeAdView.setImageView(mAdImageView); // working : Ad page is showing when click mAdImageView

}

mobileadssdk-a...@google.com

unread,
May 16, 2018, 3:00:57 PM5/16/18
to S헬스, Google Mobile Ads SDK Developers
Hello, 

Thank you for contacting us. Could you please confirm if you're referring to the Native Custom Events or Native Advanced Ads? If you're pointing to the Native Advanced Ads, the AdChoices overlay and its contents is automatically added to the AdView by the SDK. You may only change which corner the AdChoices overlay is rendered in by setting this property via setAdChoicesPlacement(). Please refer to this guide for more information. I was not able to reproduce the issue with our sample apps

If you're referring to the Native Custom Ads, then the adapter is responsible for providing an AdChoices icon via the setAdChoicesContent() method on theNativeAdMapper interface. Could you please share us a sample project of your implementation which illustrates the issue, so I can take a look? You can reply back via Reply privately to author option.

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Taehyun Lee

unread,
Jun 11, 2018, 1:11:19 AM6/11/18
to Google Mobile Ads SDK Developers
If I can't replace AdChoicesView to my custom view, (to change another position)
how can I change backgroundColor of automatically added adchoicesView?

It's always gray now.

mobileadssdk-a...@google.com

unread,
Jun 11, 2018, 11:41:57 AM6/11/18
to Taehyun Lee, Google Mobile Ads SDK Developers
Hello, 

The AdChoices overlay is added to each ad view by the SDK which is set to the top right corner by default. You will be able to use the setAdChoicesPlacement() to change which corner this overlay can be rendered. Please check this section of the guide for more information. Editing the contents of the AdChoices overlay is not available via the Mobile Ads SDK. You may also refer to this Help Center article for more relevant information.

Regards,
Bharani Cherukuri
Mobile Ads SDK Team
Message has been deleted

Mobile Ads SDK Forum Advisor

unread,
Jun 26, 2023, 1:09:53 PM6/26/23
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

Thank you for reaching out to us.

With regard to your concern, the ad attribution must be added manually which is the one that can be seen on our sample app. For AdChoices, it is added as an ad view by the SDK when a backfill ad is returned. If your app uses native ads backfill, please leave space in your preferred corner (https://developers.google.com/ad-manager/mobile-ads-sdk/android/native/options#setadchoicesplacement) of your native ad view for the automatically inserted AdChoices logo. As per this documentation (https://developers.google.com/ad-manager/mobile-ads-sdk/android/native/advanced#native_backfill_ads), the Ad Exchange backfill is currently limited to a select group of publishers.

This message is in relation to case "ref:_00D1U1174p._5004Q2mXS4e:ref"

Thanks,
 
Google Logo Mobile Ads SDK Team


Liran Barsisa

unread,
Aug 24, 2024, 5:32:04 AM8/24/24
to Google Mobile Ads SDK Developers
It says in the docs that we can set the location of the AdChoices later ,and not having to do it during loading time:

It doesn't make sense to require this to be done during loading time.
Only later, when the ad is received and we know how much space we, have the configuration of the Activity/Fragment that the ad can fit into, then we decide about the layout of the native ad and how it should look.
Only then we should have the control of where to put the AdChoices.

UI decisions shouldn't be forced to be done during loading phase. Loading phase might be cached for later use, too, including the case that the configuration changed and the layout we choose for the ad should also be changed.
I've requested now to change this, as current way doesn't make sense at all:

Mobile Ads SDK Forum Advisor

unread,
Aug 26, 2024, 2:15:11 AM8/26/24
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

Can you please point me to this statement: we can set the location of the AdChoices later and not having to do it during loading time in the AdChoice custom view document? 

Our document says that the ​​​Native ads are loaded with the AdLoader class, which has its own Builder class to customize it during creation. By adding listeners to the AdLoader when building it, an app specifies which types of native ads it is ready to receive. The AdLoader then requests just those types. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02mXS4e:ref" (ADR-00185891)


Thanks,
 
Google Logo Mobile Ads SDK Team


Liran Barsisa

unread,
Aug 26, 2024, 5:07:54 AM8/26/24
to Google Mobile Ads SDK Developers
It says it on the link I've provided:
"The AdChoices custom view feature lets you position the AdChoices icon in a custom location. This is different from AdChoices position controls, which only allows specification of one of the four corners."

It also has a snippet, showing it's after loading (callback is inside onNativeAdLoaded).
Thing is, this doesn't work, because it says "Warning: Access to this feature is limited. To request access reach out to your account manager.".

I've created a new request for this to change. Please go there instead.
At the very least, allow to set which corner to use when it's time to bind the Views, and not during loading phase when there isn't a guarantee we would know the situation of the Views and their surroundings.

Mobile Ads SDK Forum Advisor

unread,
Aug 26, 2024, 10:04:32 AM8/26/24
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

The AdChoices custom view feature is available to a limited number of users. To request access, please contact your account manager.

Feel free to reach out to us if you need more help!

Liran Barsisa

unread,
Aug 26, 2024, 10:11:01 AM8/26/24
to Google Mobile Ads SDK Developers
I don't need the view to be customized. Only the location.
And even customized corner would be fine, but just let me choose it when it's time to show it, and not during loading phase which doesn't make sense.

Mobile Ads SDK Forum Advisor

unread,
Aug 26, 2024, 1:02:30 PM8/26/24
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

Currently, we recommended to follow AdChoices placements documentation on how to set a AdChoices position controls and AdChoices custom view. For any updates, please refer to these Google Mobile SDK release notes.

Liran Barsisa

unread,
Aug 26, 2024, 2:01:11 PM8/26/24
to Google Mobile Ads SDK Developers
Who/what is the "account manager" that I can contact? How can I contact it? Why isn't there a link to reach it?

Mobile Ads SDK Forum Advisor

unread,
Aug 27, 2024, 3:40:41 AM8/27/24
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

Account Manager in the document refer to an internal team who is maintaining your AdManager account, and in case you are facing any issues, contact the AdManager product support team

Liran Barsisa

unread,
Aug 28, 2024, 2:47:34 PM8/28/24
to Google Mobile Ads SDK Developers
I don't use AdManager and don't even know what it is. I use Admob. 
If it's an alternative to Admob as the samples show, that's really something weird that I don't understand, of why Admob has split the SDK into more...
Look, it shows what Admob is supposed to be doing:
https://admanager.google.com/home/
How confusing can this be...

Mobile Ads SDK Forum Advisor

unread,
Aug 29, 2024, 12:50:42 AM8/29/24
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

GMA SDK can be used for both Google Ad Manager and AdMob ads. AdMob and Google Ad Manager have the same SDK library code, but they have different implementations because they connect to two different ad management platforms. AdMob is Google's automatic ad exchange for mobile apps, while Google Ad Manager can manage ad exchanges from both web pages and mobile apps. Refer to the help center article on the comparison of AdManager and AdMob

I hope this helps! Let me know if you have additional questions.  

Liran Barsisa

unread,
Aug 29, 2024, 2:00:18 AM8/29/24
to Google Mobile Ads SDK Developers
So it's confusing.  I can see on your website there is even "AdSense" in the mix. That's worse...
1. Why not have one product instead of this split, if they are both for showing ads in various platforms? 
2. Why have this ability to customize the location of AdChoices only on one of them? 
3. Why do we need "internal team who is maintaining your AdManager account" to do it? 
4. Should I switch to AdManager just for this feature?  
5. Can AdManager do everything that Admob do? If so, why not use it in general instead of Admob?

Mobile Ads SDK Forum Advisor

unread,
Aug 29, 2024, 3:21:54 AM8/29/24
to lbl...@gmail.com, google-adm...@googlegroups.com

Hi Liran,

I will check with our team regarding your queries and one of my team members will reach out to you once we have an update. Meanwhile, your patience is appreciated. 

Mobile Ads SDK Forum Advisor

unread,
Sep 3, 2024, 9:56:37 AM9/3/24
to google-adm...@googlegroups.com, lbl...@gmail.com
Hi Liran,

The AdChoice position API allows you to specify one of the four corners you'd like to put a Google rendered AdChoice icon. The AdChoice custom view API, which is only available to a limited number of publishers, allows you to render the AdChoice icon on your own to match your intrinsic style of your ad.

Ad Manager and AdMob are two separate products. Ad Manager gives you the ability to configure ads for both mobile and web, whereas AdMob can only serve ads to mobile platforms. Either Ad Manager or AdMob can cover all features of each other and they have different markets. The SDK is just a tool to integrate with the products. I hope that answers your questions.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02mXS4e:ref" (ADR-00185891)

Thanks,
 
Google Logo
Jill Song
Mobile Ads SDK Team


Liran Barsisa

unread,
Sep 5, 2024, 10:03:41 PM9/5/24
to Google Mobile Ads SDK Developers
But why split?
You could have Admob just support both.
You said it yourself, that the SDK is the same, no? "GMA SDK can be used for both Google Ad Manager and AdMob ads".

As for AdChoice, why offer it only for AdManager?

And why can't I set the corner-position when it's time to show the ad, and not when it's time to load it? It doesn't make sense that it would be during loading time...
All the UI decisions are done when it's time to show the ad, not when you load it. Please change it.

Mobile Ads SDK Forum Advisor

unread,
Sep 6, 2024, 9:44:51 AM9/6/24
to lbl...@gmail.com, google-adm...@googlegroups.com
Hi Liran,

NativeAdOptions contains signals needed for Google to render the ad assets, therefore it's needed at the time of request. For publisher who render the Ad Choice on their own, Google doesn't need to know, so you can set at the time of display.

Liran Barsisa

unread,
Sep 8, 2024, 6:05:23 AM9/8/24
to Google Mobile Ads SDK Developers
So render them when the time comes to render them, not during loading time which doesn't make sense. 
Or at least let us tell you which corners we might choose, and later we tell you which corner we actually choose.
As for "publisher who render the Ad Choice on their own" , just provide us with the tools to render so that we can do it during the binding phase, when we know where it should be put.

Mobile Ads SDK Forum Advisor

unread,
Sep 10, 2024, 12:16:36 PM9/10/24
to lbl...@gmail.com, google-adm...@googlegroups.com
Hi Liran,

The NativeAdView.setAdChoicesView() API is not available to all publishers I'm afraid. The APIs are designed in such a way and we don't have plan to rewrite this feature.
Reply all
Reply to author
Forward
0 new messages