开发者

My Android AdMod ad is blank in test mode

I am trying to display admod ads on my android app. Instad of writing java code, I was going to use a WevView that displayed a web page with the following code TED

<script type="text/javascript">
 var admob_vars = {
  pubid: 'Mu Publisher id is here', //
  bgcolor: '000000', // background color (hex)
  text: 'FFFFFF', // font-color (hex)
  test: true // test mode, set to false if non-test mode
 };
 </script>
 <script type="text/javascri开发者_StackOverflow中文版pt" src="http://mm.admob.com/static/iphone/iadmob.js"></script>

The WebView only displays TED and no test message.

  • Ted


A webview doesn't by default support javascript.

you can use:

webview.getSettings().setJavaScriptEnabled(true);

to enable javascript in a webview.

(I know I might be a tad late but google overlords redirected me to this page while I was looking for a similar problem ;-))

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜