Пример #1
0
        public static AdMobRewardedVideo Ad_RewardedVideo(Activity context)
        {
            try
            {
                if (AppSettings.ShowAdMobRewardVideo)
                {
                    if (CountRewarded == AppSettings.ShowAdMobRewardedVideoCount)
                    {
                        CountRewarded = 0;
                        AdMobRewardedVideo ads = new AdMobRewardedVideo();
                        ads.ShowAd(context);
                        return(ads);
                    }
                    else
                    {
                        AdsFacebook.InitRewardVideo(context);
                    }

                    CountRewarded++;
                }
                else
                {
                    AdsFacebook.InitRewardVideo(context);
                }
                return(null);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                return(null);
            }
        }
Пример #2
0
        public static AdMobRewardedVideo Ad_RewardedVideo(Activity context)
        {
            try
            {
                if (AppSettings.ShowAdMobRewardVideo)
                {
                    if (CountRewarded == AppSettings.ShowAdMobRewardedVideoCount)
                    {
                        CountRewarded = 0;
                        AdMobRewardedVideo ads = new AdMobRewardedVideo();
                        ads.ShowAd(context);
                        return(ads);
                    }
                    else
                    {
                        AdsFacebook.InitRewardVideo(context);
                    }

                    CountRewarded++;
                }
                else
                {
                    AdsFacebook.InitRewardVideo(context);
                }
                return(null !);
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
                return(null !);
            }
        }
Пример #3
0
        public static AdMobRewardedInterstitial Ad_RewardedInterstitial(Activity context)
        {
            try
            {
                switch (AppSettings.ShowAdMobRewardedInterstitial)
                {
                case true when CountRewardedInterstitial == AppSettings.ShowAdMobRewardedInterstitialCount:
                {
                    CountRewardedInterstitial = 0;
                    AdMobRewardedInterstitial ads = new AdMobRewardedInterstitial();
                    ads.ShowAd(context);
                    return(ads);
                }

                case true:
                    AdsFacebook.InitRewardVideo(context);
                    break;

                default:
                    AdsFacebook.InitRewardVideo(context);
                    break;
                }

                return(null !);
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
                return(null !);
            }
        }