开发者

Android: Using AdMob with OpenGL application

I am making a game using OpenGL and wish to add adMob. I am currently able to get the AdMob to successfully request ads, in fact, my app has requested over 200 ads so far ( n开发者_JAVA技巧ot testing ). I can't fix the error: "Not enough space to show ad!". Now I have searched for months now, here and there when i have time away from my main project, but there is virtually NO documentation on how to do this. IF anyone knows of a solution to this problem ( in code ) please help. I will post my Activity initialization code.

Main problem "Not enough space to show ad!"

AdView adView = new AdView(this, AdSize.BANNER, "my publisher id");
adView.setEnabled(true);
RelativeLayout rl = new RelativeLayout(this);
AdRequest r = new AdRequest();
adView.setPadding(0, 0, 0, 0);
adView.loadAd(r);
rl.addView(adView);
rl.addView(gmView);
setContentView(rl);

Also, are there any lines i can add to make the ad Width larger in the code above?


I know this question is old, but for anyone finding it via google:

Android add advert (admob) to OPENGL-ES screen

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜