4
votes

Can you show both banner ads and interstitial ads on the same activity? Is it against AdMob policy?

For example, when you open the app, interstitial ad shows up, and when you close it, banner ad shows up, or when banner ad is already showed you display interstitial ad.

2
yes you can for more detail go and see admob tutorialAndroid is everything for me

2 Answers

1
votes

Yes, you can.

Have a look at the documentation for more info https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals

Also you might find using an "AdListener" very useful for your purposes!

adView.setAdListener(new AdListener() {
            @Override
            public void onAdClosed() {
                //Called when the user is about to return to the application after 
                super.onAdClosed();
            }

            @Override
            public void onAdFailedToLoad(int errorCode) {
                //Called when an ad request failed
                super.onAdFailedToLoad(errorCode);
            }

            @Override
            public void onAdLeftApplication() {
                //Called when an ad leaves the application (e.g., to go to the browser)
                super.onAdLeftApplication();
            }

            @Override
            public void onAdOpened() {
                //Called when an ad is received
                super.onAdOpened();
            }

            @Override
            public void onAdLoaded() {
                //Called when an ad opens an overlay that covers the screen
                super.onAdLoaded();
            }
        });

You can fill each method with your own code :)

0
votes

Ofcourse you can show both the banner ad and interstitial ad in you application. Here you go.

MainActivity.java add below lines of code in onCreate metho