我向我的應用添加了插頁式廣告(+橫幅),其中包含一項活動,橫幅沒有問題,但插頁式廣告僅在應用啓動時顯示一次,我的應用不包含任何按鈕或操作,僅包含pdfview,想要做的就是當用戶閱讀pdf時每5分鐘顯示一次廣告。我搜索了類似的問題,但無法得到它。在這裏我的代碼加載和顯示廣告:如何調用多個插頁式廣告?
AdView mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
// Prepare the Interstitial Ad
interstitial = new InterstitialAd(PDFViewActivity.this);
// Insert the Ad Unit ID
interstitial.setAdUnitId("ca-app-pub-3940256099942544/1033173712");
interstitial.loadAd(adRequest);
// Prepare an Interstitial Ad Listener
interstitial.setAdListener(new AdListener() {
public void onAdLoaded() {
// Call displayInterstitial() function
displayInterstitial();
}
});
}
public void displayInterstitial() {
// If Ads are loaded, show Interstitial else show nothing.
if (interstitial.isLoaded()) {
interstitial.show();
}
}
想想這個想法兩次。首先,這不是Google提出的展示插頁式廣告的建議方式。其次,你會因爲這種惱人的行爲而讓用戶失望,所以他們絕不會點擊並卸載你的應用。 – Bevor
如果你認爲你比用戶更瞭解它,那麼祝你好運;) – Bevor