Perform a click on NativeAd

529 views
Skip to first unread message

Bojan Kerec

unread,
Jun 21, 2022, 4:38:14 AM6/21/22
to Google Mobile Ads SDK Developers
Hi,
I am integrating native ads into my game and I have issues with call to action. Since I'm doing everything with my own API (rendering images and text) I cannot properly simulate a click. I tried recordCustomClickGesture and performClick (I'm passing "new Bundle()" into the function) but nothing happens. One would expect that the Play store will open. I'm detecting a click on call to action button in native c++ code and calling java code that handles NativeAd object. I couldn't find any samples that would show this use case.

Please help.
Cheers

Mobile Ads SDK Forum Advisor

unread,
Jun 21, 2022, 10:17:29 AM6/21/22
to bojan...@gmail.com, google-adm...@googlegroups.com

Hi Bojan,

Thank you for reaching out to us.

Can you confirm if you are implementing Native ads custom events? If yes, as per our documentation, callToActionView should be disabled. Kindly note, that our sample code disables user interaction for the UIButton that displays the call to action. If you use UIButtons to display native ad assets, you also need to disable their user interaction so that the Google Mobile Ads SDK can properly receive and process UI events. Because of this extra step, it's frequently best to avoid UIButtons entirely and use UILabel and  UIImageView instead. Let me know if this is what you're looking for.

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2byXax:ref

Bojan Kerec

unread,
Jun 22, 2022, 10:57:43 AM6/22/22
to Google Mobile Ads SDK Developers
I was not totally clear in my first post what I'm trying to achieve. I'm making a game and I want to fully integrate ads into my UI. A good example is provided in Google I/O 2016 video "Create a great user experience with native ads". I have loaded a NativeAd, extracted required text and images and showed the ad by using my own implementation of UI elements written in native c++ code. But I have now problem with simulating a click where a Play store would open. I am calling appropriate methods on NativeAd object (nativeAd.performClick(new Bundle()) and nativeAd.recordImpression(new Bundle())). The following following content was written in logs:

The ad slot cannot handle external impression events. You must be in the allow list to be able to report your impression events.
The ad slot cannot handle external click events. You must be part of the allow list to be able to report your click events.

What do I have to do to solve this?

torek, 21. junij 2022 ob 16:17:29 UTC+2 je oseba mobileadssdk napisala:

Mobile Ads SDK Forum Advisor

unread,
Jun 22, 2022, 12:11:02 PM6/22/22
to bojan...@gmail.com, google-adm...@googlegroups.com
Hi Bojan,

Our documentation states this error. This support channel can only assist integrating the Mobile Ads SDK into apps, and you are experiencing an allowlist issue. I can only suggest you reach out to your Google Account representative to get you allowlisted for this feature.

With that being said, there may be a revenue threshold to pass in order to get an account manager. Here's an Ad Manger Forum thread on an unrelated allowlisting issue that may help sort this out for you. Here are links to AdMob Help Community in case you are using AdMob, and here's Ad Manager Help Community if you are using Ads Manager.

Regards,

Google Logo
Aryeh
Mobile Ads SDK Team
 


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