简体   繁体   English

在特定时间后如何自动关闭插页式广告?

[英]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). 我正在编写应用程序并使用插页式广告单元(通过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

You can't close Admob Interstitial ad programmatically. 您无法以编程方式关闭Admob非页内广告。 Admob doesn't allow developers to close Interstitial ad programmatically. Admob不允许开发人员以编程方式关闭插页式广告。 Only users can close ads by clicking on close button or back button. 只有用户可以通过点击关闭按钮或返回按钮来关闭广告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM