Пример #1
0
        public void CreateInterstitialAds(AdsListening listen = null)
        {
            var adRequest = new AdRequest.Builder().Build();

            interstitial            = new InterstitialAd(context);
            interstitial.AdUnitId   = context.GetString(Resource.String.admobInterstitial);
            interstitial.AdListener = listen != null ? listen : new AdsListening();
            interstitial.LoadAd(adRequest);
        }
Пример #2
0
        public void CreateAds(AdView adView, AdsListening listen = null)
        {
            var re = new AdRequest.Builder().Build();

            if (string.IsNullOrEmpty(adView.AdUnitId))
            {
                throw new ValidatingException("Ads unit id is required (AdsView)");
            }
            var listener = new AdsListening();

            adView.AdListener = listen != null? listen : listener;
            adView.LoadAd(re);
        }