val builder = AdLoader.Builder(context, getString(R.string.main_native))
val adLoader = builder.forUnifiedNativeAd { unifiedNativeAd ->
nativeAds.add(unifiedNativeAd)
}.withAdListener(object : AdListener() {
override fun onAdFailedToLoad(errorCode: Int) {
}
}).build()
// Load the Native ads.
adLoader.loadAds(AdRequest.Builder().build(), 5)
Hi there,
Thank you for reaching out to us.
The team is still currently investigating this issue. However, do kindly note that all ads are being loaded in the main thread, which should explain why your app (or at least its UI) would experience a slight freeze when loading the native ads. As a workaround, you may want to load as few as only 1 native ad for now if this situation persists.
Regards,
Ziv Yves Sanchez
Mobile Ads SDK Team