admobnative-ads

How to handle clicks for native ads


I managed to display a native add nicely within my app. I am currently struggling to understand how to add a click handler to it. From what I'm reading I'm left with the impression that this should not be done manually and instead provided by the SDK.

Then I'm reading in some articles information that you should use NativeAdView as a root element, and in others such is absent.

This is what is puzzling me, as promoted as native ad, that is integrating within your app ui as if element of the same app, I managed to accomplish that, then you should use NativeAdView which seems is providing some out of the box UI and I just can't find a single source of truth what is right and what is wrong.

Can anyone assist me on that, please?


Solution

  • I managed to make it working - indeed a NativeAdView is needed, the clicks shouldn't be handled by the developer.