private void LoadInterstitialAd() { AdViewInterstitial = new Interstitial(InterstitialAdID); AdViewInterstitial.AdReceived += (obj, e) => { Console.WriteLine("Interstitial ad received and ready to be displayed."); OnInterstitialLoaded?.Invoke(this, new EventArgs()); }; AdViewInterstitial.ScreenDismissed += (obj, e) => { Console.WriteLine("Interstitial ad closed."); LoadInterstitialAd(); //Engine.Pause = false; }; AdViewInterstitial.ReceiveAdFailed += (obj, e) => { Console.WriteLine($"Interstitial ad failed to load, error: {e.Error.DebugDescription}"); }; AdViewInterstitial.LoadRequest(Request.GetDefaultRequest()); }
private void _adInterstitial_AdReceived(object sender, EventArgs e) { OnInterstitialLoaded?.Invoke(sender, e); }
private void InterstitialAdListener_AdLoaded(object sender, EventArgs e) { OnInterstitialLoaded?.Invoke(sender, e); }
private void _interstitialAd_WillPresentScreen(object sender, EventArgs e) { OnInterstitialLoaded?.Invoke(sender, e); }