[英]How to automatically close an Interstitial Ad after specific amount of time?
我正在編寫應用程序並使用插頁式廣告單元(通過Google-AdMob)。 我想對其進行編程,以便廣告將在特定時間后自動關閉廣告。 這是我正在談論的代碼:
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
您無法以編程方式關閉Admob非頁內廣告。 Admob不允許開發人員以編程方式關閉插頁式廣告。 只有用戶可以通過點擊關閉按鈕或返回按鈕來關閉廣告。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.