Exemplo n.º 1
0
        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})");
 }
Exemplo n.º 4
0
 public override void OnAdClosed()
 {
     base.OnAdClosed();
     AdClosed?.Invoke(null, null);
     Console.WriteLine("OnAdClosed");
 }