Find your content:

Search form

You are here

onAdLoaded admob called but ad not visible

 
Share

Try to keep the following code inside onInitializationComplete method. Make sure when you get view by id it is typecased to AdView.

MobileAds.initialize(this, new OnInitializationCompleteListener() {
				@Override
				public void onInitializationComplete(InitializationStatus initializationStatus) {
	mAdView = (AdView) findViewById(R.id.adView1);
	AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR).build();
      mAdView.loadAd(adRequest);
}
}

My Block Status

My Block Content