示例#1
0
        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());
        }
示例#2
0
 private void _adInterstitial_AdReceived(object sender, EventArgs e)
 {
     OnInterstitialLoaded?.Invoke(sender, e);
 }
示例#3
0
 private void InterstitialAdListener_AdLoaded(object sender, EventArgs e)
 {
     OnInterstitialLoaded?.Invoke(sender, e);
 }
示例#4
0
 private void _interstitialAd_WillPresentScreen(object sender, EventArgs e)
 {
     OnInterstitialLoaded?.Invoke(sender, e);
 }