FearKill
FearKill

Reputation: 33

How to automatically close an Interstitial Ad after specific amount of time?

I am programming an app and using an Interstitial Ad Unit (With Google-AdMob). I want to program it so the ad will automatically close the ad after a specific amount of time. This is the code that I was talking about:

    private void showInterstitial() {
        // Show the ad if it's ready. Otherwise toast and reload the ad.
        if (mInterstitialAd != null && mInterstitialAd.isLoaded()) {
            mInterstitialAd.show();
            try {
                Thread.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            //here I need to close the ad

Upvotes: 2

Views: 1660

Answers (1)

Ibrar Khan
Ibrar Khan

Reputation: 439

You can't close Admob Interstitial ad programmatically. Admob doesn't allow developers to close Interstitial ad programmatically. Only users can close ads by clicking on close button or back button.

Upvotes: 6

Related Questions