using GoogleMobileAds.Api;
...
// Initialize an InterstitialAd.
InterstitialAd interstitial = new InterstitialAd("MY_AD_UNIT_ID");
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the interstitial with the request.
interstitial.LoadAd(request);
if (interstitial.IsLoaded()) {
interstitial.Show();
}
interstitial.AdLoaded += HandleAdLoaded;
interstitial.AdFailedToLoad += HandleAdFailedToLoad;
...
public void HandleAdLoaded(object sender, EventArgs args)
{
print("HandleAdLoaded event received.");
// Handle the ad loaded event.
}
public void HandleAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)
{
print("Interstitial Failed to load: " + args.Message);
// Handle the ad failed to load event.
};
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/BwDd36h5y38/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Eric, it was the Ad ID being for the wrong type of ad. Thanks for the help! Works like a charm now.
Unfortunately, probably not. The ad will show but if a user clicks on an interstitial ad, presses the 'back button' your app will crash. This interstitial bug is widely reported yet AdMob refuses to comment on it.
On Thursday, June 5, 2014 7:21:35 AM UTC-7, Aron Davis wrote:Eric, it was the Ad ID being for the wrong type of ad. Thanks for the help! Works like a charm now.
--