-1
我想通过Admob在Android手机应用中使用Phonegap实现广告。我已经使用HTML + Javascrip/Jquery编写了整个代码,现在我正在使用Phonegap构建本机应用程序。Phonegap App for Android:在div中显示Admob广告
我可以使用此代码通过AdMob联播广告中看到:
public class ModernSnake extends DroidGap {
/** Called when the activity is first created. */
private static final String AdMob_Ad_Unit = "a151376a873f810";
private AdView adView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 10000);
adView = new AdView(this, AdSize.BANNER, AdMob_Ad_Unit);
LinearLayout layout = super.root;
layout.addView(adView);
AdRequest request = new AdRequest();
request.setTesting(true);
adView.loadAd(request);
}
} 但问题是,旗帜在页面底部的全部时间。
所以有可能通过Javascript调用adView函数,也许显示在我之前创建的div中?