I am trying to have two banner ads on the same page through admob in android studio. I have one ad working, but I am not sure how to get the other working.
So far this is what I have for one ad in java:
AdView adView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.setRequestAgent("android_studio:ad_template").build();
adView.loadAd(adRequest);
This works, but how would I add a second ad with the ID adView2?
Showing two ads on the same screen at the same time is actually a violation of AdMob's policies, and could result in the suspension of your account. I would not recommend implementing an app that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With