async void ShowInterstitial() { do { await Task.Delay(100); } while (!adInterstitial.IsReady); InvokeOnMainThread(() => adInterstitial.PresentFromRootViewController(navController)); }
public void Show(string adUnit) { _adInterstitial = new GADInterstitial(adUnit); var request = GADRequest.Request; _adInterstitial.AdReceived += (sender, args) => { if (_adInterstitial.IsReady) { var window = UIApplication.SharedApplication.KeyWindow; var vc = window.RootViewController; while (vc.PresentedViewController != null) { vc = vc.PresentedViewController; } _adInterstitial.PresentFromRootViewController(vc); } }; _adInterstitial.LoadRequest(request); }