我收到了 Admob 政策违规电子邮件
布局鼓励意外点击 - 插页式广告:
当用户查看应用内容时意外加载插页式广告。
下面是我的实现。如果有什么问题请告诉我
private void initShareInterstitial() {
shareInterstitialAd = new InterstitialAd(this);
shareInterstitialAd.setAdUnitId(getString(R.string.share_int));
shareInterstitialAd.loadAd(new AdRequest.Builder().build());
shareInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdClosed() {
// Load the next interstitial.
shareInterstitialAd.loadAd(new AdRequest.Builder().build());
new ShareTask().execute();
}
@Override
public void onAdFailedToLoad(int i) {
shareInterstitialAd.loadAd(new AdRequest.Builder().build());
}
@Override
public void onAdLeftApplication() {
shareInterstitialAd.loadAd(new AdRequest.Builder().build());
}
});
}
在 OnCreate 方法中,我在共享按钮 onclick 操作上使用此代码
if (shareInterstitialAd.isLoaded()
&& random.nextBoolean()
&& random.nextBoolean()) {
shareInterstitialAd.show();
} else {
new ShareTask().execute();
}
最佳答案
您的邮政编码不足以描述显示插页式广告的流程。 从有限的代码来看,您有可能先显示应用程序的内容,然后显示插页式内容以重叠内容。这违反了 Admob 政策。插页式广告必须在显示内容之前显示。 您可以引用他们的禁止示例。
关于java - 如何修复 Admob 插页式广告政策违规问题 : Interstitial ads that load unexpectedly while a user is viewing the app’s content,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52658643/