clockbyte / admobadapter

It wraps your Adapter to display Admob native ads and banners in a ListView/RecyclerView data set. It based on the Yahoo fetchr project https://github.com/yahoo/fetchr
Apache License 2.0
237 stars 75 forks source link

onAdFailedToLoad for adSize under 132 height #92

Closed HaydenCampbell closed 7 years ago

HaydenCampbell commented 7 years ago

In v1.4.5 I'm getting no ads showing if they are under 132 height: `

        AdSize adSize = new AdSize(AdSize.FULL_WIDTH, 80);

        adapterWrapper = AdmobExpressAdapterWrapper.builder(this)
                .setLimitOfAds(10)
                .setFirstAdIndex(2)
                .setNoOfDataBetweenAds(10)
                .setTestDeviceIds(testDevicesIds)
                .setAdapter(customCursorAdapter)
                .setSingleAdSize(adSize)
                .setAdViewWrappingStrategy(new AdViewWrappingStrategyBase() {
                    @NonNull
                    @Override`

Log: I/Ads: Starting ad request. I/Ads: This request is sent from a test device. W/Ads: There was a problem getting an ad response. ErrorCode: 0 W/Ads: Failed to load ad: 0 I/com.clockbyte.admobadapter.expressads.AdmobFetcherExpress: onAdFailedToLoad 0 W/Ads: There was a problem getting an ad response. ErrorCode: 0 W/Ads: Failed to load ad: 0 I/com.clockbyte.admobadapter.expressads.AdmobFetcherExpress: onAdFailedToLoad 0 I/com.clockbyte.admobadapter.expressads.AdmobFetcherExpress: Fetching Ad now

kot331107 commented 7 years ago

@HaydenCampbell Have you checked that there's enough place for your ads? Actually nothing was changed in AdmobExpressAdapterWrapper in part of ad wrapping...

kot331107 commented 7 years ago

@HaydenCampbell you know I have digged into it a bit and I found that there is a fix for #83 in 1.4.5. the gist of the issue is if you even set your custom AdSize it picks the default one instead. So it has been fixed and Admob server tells you that it can't load a suitable ad for a height 80. Please try to change it to a higher value instead.

HaydenCampbell commented 6 years ago

Hello, I think this could be a different issue to #83. I am not getting the can't load suitable ad for 80 height from the Admob server, just getting the errors above. Also 80 height works fine in 1.3.0 in my app in production. Can you think of any changes between 1.3.0 and 1.4.5 which might cause it?