Can I place AdMob banner in a recycler view? Does It violate any program policy?

94 views
Skip to first unread message

apps gallery

unread,
Jul 4, 2019, 12:22:02 PM7/4/19
to Google Mobile Ads SDK Developers
Can I place AdMob banner in a recycler view?. My application is all about listing news from various sources under different category(Say Politics, sports, movies..etc), I have designed app using ViewPager for the category and recycler view for listing the news, I have placed AdMob banner ads inside the recyclerview  in a periodical index for example at 5,10,15,20... positions of a recycler view (I have referred https://github.com/googlesamples/android-ads/tree/master/advanced/BannerRecyclerViewExample/app/src/main/java/com/google/android/gms/example/bannerrecyclerviewexample) . Also, I am pausing the ads if the fragment (NewsListingFragment  of  a News Category) is invisible and resuming if the fragment is visible

@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
boolean isAdapterNull=mAdapter==null|| (mAdapter != null && mAdapter.getItemCount() <= 0);

if (isVisibleToUser && isAdded()&&isAdapterNull ) {
fetchNews(0);
}
if(mAdapter!=null) {
if (isVisibleToUser) {
resumeAds(mAdapter.getItemWithAds());
} else {
pauseAds(mAdapter.getItemWithAds());
}
}
}

 Does It violate any program policy?

Mobile Ads SDK Forum Advisor Prod

unread,
Jul 4, 2019, 9:38:38 PM7/4/19
to store.ap...@gmail.com, google-adm...@googlegroups.com

Hi there,

Thank you for writing this to us. As for your question, yes, you can place AdMob banner in a RecyclerView. However, with regard to your policy related concern, it's best that you reach out to our Product Support Team via this channel for them to provide better insights on this. You may also want to check these relevant articles below for allowable implementations:

Please let me know if you have questions related to the code implementation of the Mobile Ads SDK. I'll be happy to assist you.

Regards,
Mark Albios
Mobile Ads SDK Team



ref:_00D1U1174p._5001UCb73J:ref
Reply all
Reply to author
Forward
0 new messages