开发者

Android AdMob Phonegap Ads Not Displaying

开发者 https://www.devze.com 2023-04-11 11:51 出处:网络
I\'ve got AdMob integrated with my Phonegap application, and everything appears to be working in test (when I have request.addTestDevice(AdRequest.TEST_EMULATOR); set, I can see the test ad) but when

I've got AdMob integrated with my Phonegap application, and everything appears to be working in test (when I have request.addTestDevice(AdRequest.TEST_EMULATOR); set, I can see the test ad) but when I run it on a device I see no ads. I'm getting a message that says onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.). I've read that this is just due to AdMob not having anything to display at the time; however, on my AdMob console, I'm not showing that the Site Status is inactive, and I'm not showing any requests. Any idea what I could be doing wrong?

Here is the code I used to get the ads (and yes, my publisher ID is correct, I've copied and pasted it several times):

            this.adView = new AdView(this, AdSize.BANNER, "a14e85e6e674aa6");

        this.appView.addVie开发者_如何学Cw(this.adView);

        AdRequest request = new AdRequest();

        this.adView.loadAd(request);


You're NOT showing that the site status is inactive? Don't you mean that you ARE showing an inactive site status?

The code that you have posted here works. What you've read is true, ads don't fill 100% of the time. In addition, it sometimes takes a while for new apps to start receiving real ads.

0

精彩评论

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