Tripurari Tiwari
Tripurari Tiwari

Reputation: 57

Android studio firebase banner ads id not working with intertial ads ids

I have use banner ads in my app and want to add interstitial ads too with same firebase ad mob project. How can I do it? I have use banner id with the interstitial ads id but when I do it, it doesn't display it. Help me to get out of this. Add interstitial ads in fire-base ad mob projects which already banner ads id have in that project.

  mAdView = (AdView) findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder().build();
    mAdView.loadAd(adRequest);

    mInterstitialAd = new InterstitialAd(this);
    mInterstitialAd.setAdUnitId(" ca-app-pub-6314200474000962/6862626336");
    requestNewInterstitial();
    mInterstitialAd.setAdListener(new AdListener() {
        @Override
        public void onAdClosed() {
            requestNewInterstitial();
        }
    });

    requestNewInterstitial();

Upvotes: 0

Views: 169

Answers (1)

William
William

Reputation: 20196

You need to explicitly call mInterstitialAd.show() at whatever natural breakpoint in your app you intend on showing the interstitial.

Upvotes: 1

Related Questions