androidadmobgoogle-dfp

How to avoid duplicates when loading multiple ads using multiple AdLoader objects?


I'm using Google Native Ads to load multiple custom template ads in my app, each with its own ad unit ID.

As it states here:

If you need to request multiple ads in parallel, you can always use multiple AdLoader objects.

I use multiple AdLoader objects in parallel in a screen. Until play services ads version 18.0.0, I used a Correlator object to make sure the ads are correlated and to not receive duplicates.

Since the upgrade to play services ads version 18, this has stopped working and in version 18.1.0 the Correlator class is deprecated as seen in the release notes

Removed the Correlator class and its associated APIs. This feature was previously non-functional.

So my question is: what to use instead of the correlator when loading multiple native ads on the same screen? Documentation says nothing about this, I haven't found anything related to this issue.


Solution

  • I've contacted Google support on this matter. Turns out they will add the Correlator class back in a future SDK update, having multiple requests for this scenario.