您好,我有一个 webview 项目。我想为我的项目添加插页式广告。我有一个横幅广告,但我想再添加一个全屏广告。我该怎么做?有人帮我吗?我的 xml 有一个唯一的 webview (webView) 和广告 (adsView)。谢谢。
问问题
1509 次
1 回答
0
在您的活动中添加以下代码行
interstitial = new InterstitialAd(this);
interstitial.setAdUnitId("ca-app-pub-6046034785851961/xxxxxx");
// Create ad request.
AdRequest adRequest = new AdRequest.Builder().build();
// Begin loading your interstitial.
interstitial.loadAd(adRequest);
interstitial.setAdListener(new AdListener(){
public void onAdLoaded(){
displayInterstitial();
}
});
于 2014-04-15T07:03:31.653 回答