我必须在我的应用程序中添加 Flurry 全屏广告,但它没有显示任何添加。请在下面找到我的代码。
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.admob_layout);
FlurryAds.setAdListener(this);
mBanner = (FrameLayout) findViewById(R.id.bannerframe);
}
@Override
public void onStart() {
super.onStart();
FlurryAgent.onStartSession(this, Constant.F_API_KEY);
// fetch and prepare ad for this ad space. won’t render one yet
FlurryAds.initializeAds(FlurryAdActivity.this);
FlurryAds.fetchAd(FlurryAdActivity.this, Constant.F_FULL_AD, mBanner, FlurryAdSize.FULLSCREEN);
}
public void spaceDidReceiveAd(String adSpace) {
// called when the ad has been prepared, ad can be displayed:
FlurryAds.displayAd(FlurryAdActivity.this, adSpace, mBanner);
}
@Override
public void onStop() {
super.onStop();
FlurryAgent.onEndSession(this);
我在清单文件中添加了必需的活动。