I have a scrolling activity in which I want to place multiple ads (of banner type, so that they are wide and not tall), spaced apart so that you can only see one at any one time. I prefer that to a single static banner e.g. at the bottom of the activity.
First, does this violate the admob policy? There is some suggestion that you can only have a single banner ad on any activity, but other suggestions that having multiple is OK so long as you can only see one at a time?
Second, is there any way to ensure that different ads are server to the different ad units on the same activity? My initialisation code is currently something like:
AdView mAdView1 = findViewById(R.id.adView1);
AdView mAdView2 = findViewById(R.id.adView2);
MobileAds.initialize(this, "ca-app-pub-xxxxxxxxxxxxxxx~xxxxxxxxxx");
AdRequest adRequest = new AdRequest.Builder().build();
mAdView1.loadAd(adRequest);
mAdView2.loadAd(adRequest);
And my layout has:
<com.google.android.gms.ads.AdView
style="@style/MyAdView"
android:id="@+id/adView1"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxxx">
</com.google.android.gms.ads.AdView>
(and another for adView2)