Esempio n. 1
0
        }//LoadAd()

        private void DisplayAd()
        {
            intlistener.AdLoaded += () => { if (FinalAd.IsLoaded)
                                            {
                                                FinalAd.Show();
                                            }
            };
            FinalAd.AdListener = intlistener;
            FinalAd.CustomBuild();
        }//DisplayAd
Esempio n. 2
0
        public void CallInterstitial()
        {
            if (_adInterstitial != null)
            {
                return;
            }

            AdListenerCustom intlistener = new AdListenerCustom();

            intlistener.AdLoaded += () => { if (_adInterstitial.IsLoaded)
                                            {
                                                _adInterstitial.Show();
                                            }
            };
            intlistener.AdClosed += () => { _adInterstitial = null; };

            _adInterstitial            = AdWrapper.ConstructFullPageAd(this, CommonVariables.BannerId);
            _adInterstitial.AdListener = intlistener;
            _adInterstitial.CustomBuild();
        }
Esempio n. 3
0
 public void showInterstitialAds()
 {
     activity.RunOnUiThread(() =>
     {
         if (interstitial.AdListener != null)
         {
             interstitial.AdListener.Dispose();
         }
         interstitial.AdListener = null;
         var intlistener         = new YutShot.adlistener();
         intlistener.AdLoaded   += async() => {
             do
             {
                 await System.Threading.Tasks.Task.Delay(100);
             } while (!interstitial.IsLoaded || activity.g.appState == MainGame.AppState.InGame);
             interstitial.Show();
         };
         interstitial.AdListener = intlistener;
         interstitial.CustomBuild(testDeviceID);
     });
 }