【发布时间】:2018-05-14 17:15:10
【问题描述】:
我几天前在 Play 商店中发布了我的应用程序,一切正常,广告(横幅和插页式广告)按预期显示。但是今天,我发现出现了插页式广告,但没有出现横幅广告。这是我的第一个应用程序,我不知道可能是什么问题。
【问题讨论】:
我几天前在 Play 商店中发布了我的应用程序,一切正常,广告(横幅和插页式广告)按预期显示。但是今天,我发现出现了插页式广告,但没有出现横幅广告。这是我的第一个应用程序,我不知道可能是什么问题。
【问题讨论】:
有时,由于 Google 的广告资源中缺少广告,因此未展示广告。您可以检查广告请求响应代码以确定。
mAdView.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
// Code to be executed when an ad finishes loading.
}
@Override
public void onAdFailedToLoad(int errorCode) {
// Code to be executed when an ad request fails.
Log.d("ADMOB_ERROR_CODE", "admob error code: " + errorCode);
}
@Override
public void onAdOpened() {
// Code to be executed when an ad opens an overlay that
// covers the screen.
}
@Override
public void onAdLeftApplication() {
// Code to be executed when the user has left the app.
}
@Override
public void onAdClosed() {
// Code to be executed when when the user is about to return
// to the app after tapping on an ad.
}
});
【讨论】: