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

Express ads reinitialization doesn't work #45

Closed Geodark closed 7 years ago

Geodark commented 7 years ago

Hi,

I am using your Admob adapter for Native express ads and I added the reinitialize method call in the OnResume function. My intend is to resume the ads when I get back from an article that I've just read it (back to the Article List/RecyclerView). This is my code:

    @Override
    public void onResume() {
        super.onResume();
        loadAds();
        ...
    }
    private void loadAds() {
        if(admobExpressRecyclerAdapterWrapper != null){
            admobExpressRecyclerAdapterWrapper.reinitialize();
        }
    }

There is anything that I should do the be able to reinitialize the ads? It this a known issue?

kot331107 commented 7 years ago

@Geodark to be honest this method was not still tested very well and was added just as a interface for future purposes. You can remove the call of the loadAds(). Each Express ad block will reload itself automatically when you'll return back to your Article List/RecyclerView. The time interval for it's reload can be set in your Admob Console in the native banner options.