I have a RecyclerView
in which I have put the AdMob ad
.
I have written this code to show the ad having same Ad unit ID
at random positions in the recyclerview:
Random rand = new Random();
NativeExpressAdView adView = (NativeExpressAdView) itemView.findViewById(R.id.adView);
adView.setVisibility(View.GONE);
if (count >= random) {
random = rand.nextInt(3); // Reset the counter to random integer
count = 0;
adView.setVisibility(View.VISIBLE);
AdRequest request = new AdRequest.Builder()
.addTestDevice("********")
.addTestDevice("********")
.build();
adView.loadAd(request);
} else {
count++;
}
here's the xml part:
<com.google.android.gms.ads.NativeExpressAdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
ads:adUnitId="ca-app-pub-***/***"
ads:adSize="320x80">
</com.google.android.gms.ads.NativeExpressAdView>
So, I just want to know that is this a good practice or is there any policy violation or such thing in doing this?
Please let me know.
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/eBc6ar3ULa0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Whoa!I really appreciate this quick reply from you. This is a sigh of relief! Thanks, Vu Chau!So, do you mean that I can continue with my above written code which shows the same ads(ads with same Ad unit ID) at random positions in a RecyclerView? And I'll not be banned or anything from using google admob with this account?I'd really appreciate it if you could reply me about above questions and also let me know that how this above practice would effect the revenue generation?Thanks again.Hammad Nasir
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.