AdMob won't load programmatically
- by scottbot95
I'm need to include ads into my app and I have a settings option to disable ads. so I need to load the ad in code. I copied the code from google to handle that and when I set ads:loadAdOnCreate to true, it works just fine.
But if I set it to false and add the two lines
AdView adView = (AdView)this.findViewById(R.id.ad);
adView.loadAd(new AdRequest());
The ads stop displaying. If I look at log cat, it shows that it is receiving an ad and trying to display it. However it won't actually display on screen. Help?