public void loadAd() { if (mAdUnitId == null) { Log.d( "MoPub", "Can't load an ad in this ad view because the ad unit ID is null. " + "Did you forget to call setAdUnitId()?"); return; } if (mLocation == null) mLocation = getLastKnownLocation(); String adUrl = generateAdUrl(); mMoPubView.adWillLoad(adUrl); loadUrl(adUrl); }