Bulk loading for Native unified ads?

233 views
Skip to first unread message

Minas Keshishyan

unread,
Sep 27, 2018, 10:29:04 AM9/27/18
to Google Mobile Ads SDK Developers
AdLoader.Builder builder = new AdLoader.Builder(this, getString(R.string.ad_article_native_bottom));

builder
.forUnifiedNativeAd(unifiedNativeAd -> {
 
Log.e("TAG", "called again");
});

AdLoader adLoader = builder.withAdListener(new AdListener() {
 
@Override
 
public void onAdFailedToLoad(int errorCode) {
 
}
}).build();
adLoader
.loadAds(new AdRequest.Builder().build(), 3);


We are trying to use native unified ads inside "feed", so we need to load multiple ads at once, AdLoader has option to load multiple ads at once, but it does requests one by one and calls the callback each time. It both causes app slowdowns on slow devices and it's simply inconvenient to use.

Right now we use Facebook's audience network ( which we want to replace with AdMob ).
It has something called NativeAdsManager, which let's us do something like this:
mAdsManager.loadAds();
mAdsManager
.nextNativeAd()

It does only single request to get native ads in bulk and keeps them in memory. Also it has a convenient nextNativeAd() method to get the next ad and show it in the next ad position in feed.

Do you have plans to implement similar approach for AdMob?
Are there any reason / limitations for the current AdMob approach?

Regards,
Minas


mobileadssdk-a...@google.com

unread,
Sep 27, 2018, 3:56:57 PM9/27/18
to Minas Keshishyan, Google Mobile Ads SDK Developers
Hello Minas, 

We do have a similar approach while loading AdMob ads. It looks like you're trying to load multiple ads using the loadAds() call. If that's the case, please note that this method works only with AdMob ads which allows apps to load multiple unique ads in a single request. Mediation is currently not supported. To load mediated ads, they could use the loadAd() method. You may refer to this guide for more information. 

Let me know if you have any other questions. 

Regards,
Bharani Cherukuri
Mobile Ads SDK Team

Minas Keshishyan

unread,
Sep 28, 2018, 1:31:14 AM9/28/18
to Google Mobile Ads SDK Developers
Hi Bharani,
Thanks for quick reply.
I didn't know about the mediation part, so thanks for info.
But my main questions is about technical implementation, loadAds() seems to load ads one by one and returns them in a callback one by one.

Instead Facebook's approach seems to be much better to me, when I specify to load 10 ads, it loads up to 10 ads with single network request ( depending on how many it can fill ) and instead of returning them one by one in a callback, it keeps them in memory and has a single callback onAdsLoaded(). So when I get the callback I can do the mAdsManager.nextNativeAd() callback to get next ad.

The advantages of Facebook's implementation are:
1. It loads up to 10 ads at once with a single network request ( if it can be filled, less otherwise )
2. More straightforward API, no need to manually add received ads into an array and manage them.

mobileadssdk-a...@google.com

unread,
Sep 28, 2018, 3:54:03 PM9/28/18
to Minas Keshishyan, Google Mobile Ads SDK Developers
Hello Minas, 

I will share your feedback with the team. If you're having any trouble loading the ads using the Google Mobile Ads SDK, please let me know so I can assist you further. 

Thanks,
Reply all
Reply to author
Forward
0 new messages