Tip: Easy Interstitial Admob Ads.

Hate to bump an old thread but it’s worth mentioning that you don’t need to comment out anything in the “public void AndroidThunkJava_HideAdBanner()” section.

I also did not comment out anything in “public void AndroidThunkJava_ShowAdBanner(String AdMobAdUnitID, boolean bShowOnBottonOfScreen)” and placed the following at the top of the method with a few changes:

changed…



if(_activity.interstitialAd != null)
{
	_activity.runOnUiThread(new Runnable()
	{
		@Override
		public void run()
		{
			if(_activity.interstitialAd.isLoaded() == true)
				_activity.interstitialAd.show();					
		}
	});

}


to the following…



		if(_activity.interstitialAd != null && !bShowOnBottonOfScreen)
		{
			_activity.runOnUiThread(new Runnable()
			{
				@Override
				public void run()
				{
					if(_activity.interstitialAd.isLoaded() == true)
						_activity.interstitialAd.show();					
				}
			});

			return;
		}


so now if I specify show ad on top it performs an interstitial, and if I choose show ad on bottom it displays a banner.

To do the opposite just change this…



		if(_activity.interstitialAd != null && !bShowOnBottonOfScreen)


to this…



		if(_activity.interstitialAd != null && bShowOnBottonOfScreen)


As mentioned before you don’t call hide ad for interstitial ads.