You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 26, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 26, 2022. It is now read-only.
I ran this code and the native ads in the list are sometimes working fine but most of the time they are like the bottom two screenshots.
Can you please check whats wrong in this demo code?
Tried on different devices but no luck :(
I just changed the layout of the ad for the demonstration of the issue, so I could show that multiple ads are showing on same page together.
public boolean isLoading ()
Returns true if the ad is loading. If multiple ads are requested, returns true until all ads finish loading.
But it appears that it sometimes returns true even if the 5 native ads aren't loaded. So on onUnifiedNativeAdLoaded the method insertAdsInMenuItems() is called multiple times.
Workaround is to change the if to
if (mNativeAds.size() == NUMBER_OF_ADS) {
insertAdsInMenuItems();
}
Activity
ingvictoriano commentedon Jan 16, 2019
I'm having the same issue. I've tracked it down to adLoader.isLoading()
According to documentation
But it appears that it sometimes returns true even if the 5 native ads aren't loaded. So on onUnifiedNativeAdLoaded the method insertAdsInMenuItems() is called multiple times.
Workaround is to change the if to