public void InitAd()
        {
            _interstitialAd = new InterstitialAd(CrossCurrentActivity.Current.Activity);
            //       _interstitialAd.AdUnitId = App.InterstitialAndroidId;
            var adListener = new AdMobAdListener();

            adListener.AdClosed += () =>
            {
                AdClosed?.Invoke();

                _interstitialAd.Dispose();
                _interstitialAd = null;
            };
            adListener.AdLoaded += () =>
            {
                AdReady?.Invoke();
            };
            _interstitialAd.AdListener = adListener;
        }
 public override void OnAdClosed()
 {
     base.OnAdClosed();
     AdClosed?.Invoke();
 }
 public override void OnAdClosed()
 {
     base.OnAdClosed();
     AdClosed?.Invoke(_adUnit, null);
     Console.WriteLine($"OnAdClosed({_adUnit})");
 }
示例#4
0
 public override void OnAdClosed()
 {
     base.OnAdClosed();
     AdClosed?.Invoke(null, null);
     Console.WriteLine("OnAdClosed");
 }