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

Any plans on implementing normal banners instead of NativeExpressAds? #105

Closed lpbas closed 6 years ago

lpbas commented 6 years ago

Hello and thank you for this library!

Since google is dropping support of NativeExpressAds in 15 days, are there any plans of replacing them with normal AdMob Banners, as google recommends?

I'm gonna take a shot at this today, was just wondering how to follow the rest of the library as close as possible. Shall I create a new class "AdMobBannerAdapterWrapper", or a new EAdType to be passed to the AdmobAdapterWrapper? Which way would be the closest to the rest of the libraries code?

lpbas commented 6 years ago

I've implemented the support for normal Banners using the NativeExpressAds as a guide. I've created A PR, please take a look. #106

Shajeel-Afzal commented 6 years ago

Awesome. Hopefully, It will be merged soon so that we can use in our projects. It was much needed.

kot331107 commented 6 years ago

Guyz, will check it tmw. On vacations right now :) @L4grange thx a lot, you contribution is appreciated much. Could u plz send a link on this "dropping support"? I was out of ads news for a quite long time

lpbas commented 6 years ago

@kot331107 No worries, enjoy your vacation :)

In the official docs here (and in the firebase AdMob docs) it says on the top:

The native express ad format is being discontinued. Starting October 23, 2017, you'll no longer be able to create new native express ad units. Existing native express ad units will stop serving ads on March 1, 2018. Please see AdMob Help for more information.

Pointing to here

AdMob's official code samples have moved from NativeExpress Ads to normal Banners, thus why I needed to swap NativeExpress with banners in my Apps, since serving will stop on March 1st.

To add banner support I copied the Express package of thelibrary and changed all NativeExpressdViews to normal AdViews. Maybe some code is not needed and can be left out, but I followed the NativeExpress implementation, in order not to break anything. Let me know if you need anything else!

Shajeel-Afzal commented 6 years ago

@kot331107 Please merge the PR after reviewing and release the new update of the library. Desperately waiting.

lpbas commented 6 years ago

@Shajeel-Afzal until then you can point your build.gradle to my fork, for testing. I would not suggest releasing your app with my fork, but feel free to test using the following:

compile 'com.github.L4grange:admobadapter:-SNAPSHOT'

Shajeel-Afzal commented 6 years ago

Got it @L4grange! I'll test and report here if I found any issues.

kot331107 commented 6 years ago

Guyz I've merged changes of @L4grange to the experimental branch with my own minor changes. Will test it a bit, then prepare the next release. Also I'm going to update a Wiki.

lpbas commented 6 years ago

@kot331107 Perfect! Thank you very much :)